Support getters and setters in the context bridge API
Open
enhancement :sparkles:
- Dominant language
- C++
- Stars
- 123k
- Forks
- 17.5k
- Avg merge
- 14h 28m
- Merged PRs (30d)
- 870
Description
### Issue Details
* **Electron Version:**
* `9.x`
* **Operating System:**
* `macOS 10.15.x`
### Expected Behavior
Exposing API via `contextBridge.exposeInMainWorld` should not have side effects.
### Actual Behavior
Calling this method with an object that has a `get` property triggers it. This makes it impossible to lazy instantiate for example.
### To Reproduce
```js
contextBridge.exposeInMainWorld('vscode',{
get something(): { console.log("accessed"); }
});
```
Contributor guide
Assessment
This issue has not been assessed yet.