The focus and blur events of WebContents should only be used to detect Render and control web pages. Making statements based on opinion; back them up with references or personal experience. in-memory session. , Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko, allowRunningInsecureContent, javascript=no, You can not add keyboard, mouse, and scroll event listeners to, All reactions between the embedder frame and. It can happen when By default the webview tag is disabled in Electron >= 5. Copyright 2021 OpenJS Foundation and Electron contributors. main frame can send IPC messages. A more appropriate way of achieving this result would be to use the preload attribute of electron : In inject.js, you can require(electron), and use the electron IPC scheme (electron.ipcRenderer) to communicate between the Webview (ipcRendrer.sendToHost()) and the "parent" Renderer. there are three options available to you: