fix: register webview in main world when using contextIsolation (#16067)
This commit is contained in:
parent
dbda1a1b05
commit
8584c2f14b
11 changed files with 56 additions and 20 deletions
|
@ -2,9 +2,16 @@
|
|||
|
||||
/* global nodeProcess, isolatedWorld */
|
||||
|
||||
window.isolatedWorld = isolatedWorld
|
||||
|
||||
// Note: Don't use "process", as it will be replaced by browserify's one.
|
||||
const v8Util = nodeProcess.atomBinding('v8_util')
|
||||
|
||||
const setupWebView = v8Util.getHiddenValue(isolatedWorld, 'setup-webview')
|
||||
if (setupWebView) {
|
||||
setupWebView(window)
|
||||
}
|
||||
|
||||
const isolatedWorldArgs = v8Util.getHiddenValue(isolatedWorld, 'isolated-world-args')
|
||||
const { ipcRenderer, guestInstanceId, hiddenPage, openerId, usesNativeWindowOpen } = isolatedWorldArgs
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue