mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Disable node on child when disabled on parent
This commit is contained in:
@@ -28,6 +28,11 @@ var mergeBrowserWindowOptions = function (embedder, options) {
|
||||
if (embedder.browserWindowOptions != null) {
|
||||
// Inherit the original options if it is a BrowserWindow.
|
||||
mergeOptions(options, embedder.browserWindowOptions)
|
||||
|
||||
// Disable node integration on child window if disabled on parent window
|
||||
if (!embedder.browserWindowOptions.webPreferences.nodeIntegration) {
|
||||
options.webPreferences.nodeIntegration = false
|
||||
}
|
||||
} else {
|
||||
// Or only inherit web-preferences if it is a webview.
|
||||
if (options.webPreferences == null) {
|
||||
|
||||
Reference in New Issue
Block a user