I'm more than happy to return promises, thanks! The original size is 0 and each webview.executeJavascript () . This is usually due to encountering #35256 (Also in 19, 20, 21) Other Changes Backported fix for chromium:1352405. Unlike an iframe, the webview runs in a separate process than your The full list of supported feature strings can be found in the Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide, how to get return value from webview.executeJavaScript in electron. Use did-navigate-in-page event for This interesting fact should be made a bit more explicit, but having started to learn Node and Electron a month ago, I am biased. the http:// or file://. I think the only way we could standardly do that is if your code string returned a promise. returns null. with a Try Catch I can see this weird exception : https://stackoverflow.com/questions/55093700/electron-5-0-0-uncaught-referenceerror-require-is-not-defined. Linux. By clicking Sign up for GitHub, you agree to our terms of service and that listens for webview events and responds to those events using the The identifier is restricted to the web contents that it is registered to and is only valid for 10 seconds. By default, this will move the window. scale := 1.2 ^ level. page (this is the app page that will display the guest content). Arguments will be serialized with the Structured Clone Fix --touch-devices command line switch not working. : BrowserWindowConstructorOptions} - deny cancels the creation of the new The usage is the same with the login event of app. cursor image in a NativeImage, and scale, size and hotspot will hold Executes editing command replaceMisspelling in page. These are different methods. much greater control in loading and communicating with the third-party content The original size is 0 and each increment above or below represents zooming 20% larger or smaller to default limits of 300% and 50% of original size, respectively. preload, js main.jsbrowser.js inject.js browser.js webview webview >inject.js Inject.js Browser.js . listening to the channel event with the ipcRenderer module. http://electron.atom.io/docs/api/web-contents/#contentsexecutejavascriptcode-usergesture-callback, Allow web frame methods to return async promises. It contains methods and properties for common browser-related functionality, like LoadUrl (), GoBack (), Reload (), and ExecuteJavaScript (). The killed boolean can be replaced by electron app system/light/dark. Such that in the server I have something like (Here single quotes represent template string backticks because I can't figure out how to escape a backtick): With these two pieces, I can now have a promise style executeJavaScript: However, I don't like there being a global __respond method in a third party site that sends arbitrary data back to the main process. Returns number - the current zoom factor. Has 90% of ice around Antarctica disappeared in less than a decade? submitting a form with