sandbox - configure nativeWindowOpen:true

This matches the behaviour of sandboxed Electron renderers.
This commit is contained in:
Benjamin Pasero 2020-06-16 18:52:29 +02:00
parent 0840d6b9b8
commit 7f49ef52e3
6 changed files with 12 additions and 6 deletions

View file

@ -10,7 +10,7 @@ const path = require('path');
let window = null;
app.once('ready', () => {
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false } });
window = new BrowserWindow({ width: 800, height: 600, webPreferences: { nodeIntegration: true, webviewTag: true, enableWebSQL: false, nativeWindowOpen: true } });
window.setMenuBarVisibility(false);
window.loadURL(url.format({ pathname: path.join(__dirname, 'index.html'), protocol: 'file:', slashes: true }));
// window.webContents.openDevTools();

View file

@ -60,7 +60,8 @@ export class ProxyAuthHandler extends Disposable {
webPreferences: {
nodeIntegration: true,
webviewTag: true,
enableWebSQL: false
enableWebSQL: false,
nativeWindowOpen: true
}
};

View file

@ -47,6 +47,7 @@ export class SharedProcess implements ISharedProcess {
nodeIntegration: true,
webgl: false,
enableWebSQL: false,
nativeWindowOpen: true,
disableBlinkFeatures: 'Auxclick' // do NOT change, allows us to identify this window as shared-process in the process explorer
}
});

View file

@ -170,7 +170,8 @@ export class CodeWindow extends Disposable implements ICodeWindow {
nodeIntegration: true,
nodeIntegrationInWorker: RUN_TEXTMATE_IN_WORKER,
webviewTag: true,
enableWebSQL: false
enableWebSQL: false,
nativeWindowOpen: true
}
};

View file

@ -196,7 +196,8 @@ export class IssueMainService implements ICommonIssueService {
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
nodeIntegration: true,
enableWebSQL: false
enableWebSQL: false,
nativeWindowOpen: true
}
});
@ -247,7 +248,8 @@ export class IssueMainService implements ICommonIssueService {
webPreferences: {
preload: URI.parse(require.toUrl('vs/base/parts/sandbox/electron-browser/preload.js')).fsPath,
nodeIntegration: true,
enableWebSQL: false
enableWebSQL: false,
nativeWindowOpen: true
}
});

View file

@ -117,7 +117,8 @@ app.on('ready', () => {
webSecurity: false,
webviewTag: true,
preload: path.join(__dirname, '..', '..', '..', 'src', 'vs', 'base', 'parts', 'sandbox', 'electron-browser', 'preload.js'), // ensure similar environment as VSCode as tests may depend on this
enableWebSQL: false
enableWebSQL: false,
nativeWindowOpen: true
}
});