Disable JavaScript on child when disabled on parent

This commit is contained in:
Kevin Sawicki 2017-04-21 10:59:33 -07:00
parent cee0507090
commit 3e2a1034af

View file

@ -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