Enable setting javascript and contextIsolation via window.open
This commit is contained in:
parent
00a575c84a
commit
6ec74060b4
1 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||||
options.webPreferences.nodeIntegration = false
|
options.webPreferences.nodeIntegration = false
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable context isolation on child window if enable on parent window
|
// Enable context isolation on child window if enabled on parent window
|
||||||
if (embedder.getWebPreferences().contextIsolation === true) {
|
if (embedder.getWebPreferences().contextIsolation === true) {
|
||||||
options.webPreferences.contextIsolation = true
|
options.webPreferences.contextIsolation = true
|
||||||
}
|
}
|
||||||
|
@ -186,7 +186,7 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, frameName,
|
||||||
const options = {}
|
const options = {}
|
||||||
|
|
||||||
const ints = ['x', 'y', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'zoomFactor']
|
const ints = ['x', 'y', 'width', 'height', 'minWidth', 'maxWidth', 'minHeight', 'maxHeight', 'zoomFactor']
|
||||||
const webPreferences = ['zoomFactor', 'nodeIntegration', 'preload']
|
const webPreferences = ['zoomFactor', 'nodeIntegration', 'preload', 'javascript', 'contextIsolation']
|
||||||
const disposition = 'new-window'
|
const disposition = 'new-window'
|
||||||
|
|
||||||
// Used to store additional features
|
// Used to store additional features
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue