mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Enable context isolation on child windows
This commit is contained in:
@@ -47,6 +47,11 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||
options.webPreferences.nodeIntegration = false
|
||||
}
|
||||
|
||||
// Enable context isolation on child window if enable on parent window
|
||||
if (embedder.getWebPreferences().contextIsolation === true) {
|
||||
options.webPreferences.contextIsolation = true
|
||||
}
|
||||
|
||||
// Sets correct openerId here to give correct options to 'new-window' event handler
|
||||
options.webPreferences.openerId = embedder.id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user