webContents is missing part of its API
See original GitHub issueHere, it says that app.webContents
should give a handle to an Electron WebContents instance:
https://github.com/electron/spectron#webcontents
That section also links to the full webContents
API, documented here: http://electron.atom.io/docs/api/web-contents/
However, when I use Spectron, I’m seeing that only a subset of the webContents API works.
For example, app.webContents.getTitle()
works, but app.webContents.executeJavascript()
doesn’t work. session
is also missing.
- Why is only a subset of the WebContents API available?
- Is there any easy way to run Javascript in the context of the renderer? In other words, an alternative to
executeJavascript
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
webContents | Electron
Returns WebContents | null - The web contents that is focused in this ... In the browser window some HTML APIs like requestFullScreen...
Read more >enableRemoteModule is missing from Electron v14 TypeScript ...
Now Electron 14.0.1 is out, and this is how I could enable remote modules for both Main and Renderer processes (your webPreferences settings...
Read more >Web.Contents - PowerQuery M - Microsoft Learn
Query : Programmatically add query parameters to the URL without having to worry about escaping. ApiKeyName : If the target site has a...
Read more >Unable to validate Web.Contents request for refresh and "Skip ...
because no part of the URL can be resolved successfully. ... Document(Web.Contents("https://api.appcenter.ms/v0.1/apps/", ...
Read more >Registrant Country/Region field missing - API and Webhooks
Description I'm trying to get some participant and registrant fields for past webinars from a Zoom API Endpoint. I can extract and see...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@MarshallOfSound thanks. Wow I’m a tool
What about
webContents.session
?I am also in need for access to
webContents.session
. Are there any news on that?