mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 20:13:32 +01:00
sandbox - expose limited IPC via preload script
This commit is contained in:
@@ -163,6 +163,7 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
show: !isFullscreenOrMaximized,
|
||||
title: product.nameLong,
|
||||
webPreferences: {
|
||||
preload: URI.parse(this.doGetPreloadUrl()).fsPath,
|
||||
nodeIntegration: true,
|
||||
nodeIntegrationInWorker: RUN_TEXTMATE_IN_WORKER,
|
||||
webviewTag: true,
|
||||
@@ -777,6 +778,10 @@ export class CodeWindow extends Disposable implements ICodeWindow {
|
||||
return `${require.toUrl('vs/code/electron-browser/workbench/workbench.html')}?config=${encodeURIComponent(JSON.stringify(config))}`;
|
||||
}
|
||||
|
||||
private doGetPreloadUrl(): string {
|
||||
return `${require.toUrl('vs/code/electron-browser/workbench/preload.js')}`;
|
||||
}
|
||||
|
||||
serializeWindowState(): IWindowState {
|
||||
if (!this._win) {
|
||||
return defaultWindowState();
|
||||
|
||||
Reference in New Issue
Block a user