mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Enable setting javascript and contextIsolation via window.open
This commit is contained in:
@@ -48,7 +48,7 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||
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) {
|
||||
options.webPreferences.contextIsolation = true
|
||||
}
|
||||
@@ -186,7 +186,7 @@ ipcMain.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, frameName,
|
||||
const options = {}
|
||||
|
||||
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'
|
||||
|
||||
// Used to store additional features
|
||||
|
||||
Reference in New Issue
Block a user