Disable JavaScript on child when disabled on parent
This commit is contained in:
parent
cee0507090
commit
3e2a1034af
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue