mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Disable JavaScript on child when disabled on parent
This commit is contained in:
@@ -53,6 +53,11 @@ const mergeBrowserWindowOptions = function (embedder, options) {
|
||||
options.webPreferences.contextIsolation = true
|
||||
}
|
||||
|
||||
// Disable JavaScript on child window if disabled on parent window
|
||||
if (embedder.getWebPreferences().javascript === false) {
|
||||
options.webPreferences.javascript = false
|
||||
}
|
||||
|
||||
// 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