contextIsolation
Whether to run Electron APIs and the specified preload
script in a separate JavaScript context. Defaults to true
. The context that the preload
script runs in will only have access to its own dedicated document
and window
globals, as well as its own set of JavaScript builtins (Array
, Object
, JSON
, etc.), which are all invisible to the loaded content. The Electron API will only be available in the preload
script and not the loaded page. This option should be used when loading potentially untrusted remote content to ensure the loaded content cannot tamper with the preload
script and any Electron APIs being used. This option uses the same technique used by Chrome Content Scripts. You can access this context in the dev tools by selecting the 'Electron Isolated Context' entry in the combo box at the top of the Console tab.