Skip to content
Permalink
Browse files

REVIEW: Enable node integration for browser window

The default values have been flipped for security in
electron/electron#16235
  • Loading branch information...
Deepak Mohan authored and deepak1556 committed May 8, 2019
1 parent 4a2d0b1 commit 9c80382862089ab50aea6d2f5c8d0a2e3fa938ca
@@ -39,6 +39,7 @@ export class SharedProcess implements ISharedProcess {
images: false,
webaudio: false,
webgl: false,
nodeIntegration: true,
disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer
}
});
@@ -139,7 +139,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
// want to enforce that Code stays in the foreground. This triggers a disable_hidden_
// flag that Electron provides via patch:
// https://github.com/electron/libchromiumcontent/blob/master/patches/common/chromium/disable_hidden.patch
backgroundThrottling: false
backgroundThrottling: false,
nodeIntegration: true
}
};

@@ -383,7 +383,7 @@ export class WebviewElement extends Disposable implements Webview {
this._webview = document.createElement('webview');
this._webview.setAttribute('partition', `webview${Date.now()}`);

this._webview.setAttribute('webpreferences', 'contextIsolation=yes');
this._webview.setAttribute('webpreferences', 'contextIsolation=yes,nodeIntegration=yes');

this._webview.style.flex = '0 1';
this._webview.style.width = '0';
@@ -106,7 +106,8 @@ app.on('ready', () => {
show: false,
webPreferences: {
backgroundThrottling: false,
webSecurity: false
webSecurity: false,
nodeIntegration: true
}
});

0 comments on commit 9c80382

Please sign in to comment.
You can’t perform that action at this time.