Enable worldSafeExecuteJavaScript.

This has no effect on our use of executeJavaScript, and will become
the default in Electron 12, but for now it silences a warning in
development mode.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-03-08 22:59:35 -08:00
parent 7b095a683c
commit a9f479d60d
2 changed files with 4 additions and 2 deletions

View File

@@ -90,7 +90,8 @@ function createMainWindow(): Electron.BrowserWindow {
enableRemoteModule: true,
nodeIntegration: true,
partition: 'persist:webviewsession',
webviewTag: true
webviewTag: true,
worldSafeExecuteJavaScript: true
},
show: false
});

View File

@@ -64,7 +64,8 @@ export default class WebView extends BaseComponent {
name="${this.props.name}"
webpreferences="
contextIsolation=${!this.props.nodeIntegration},
spellcheck=${Boolean(ConfigUtil.getConfigItem('enableSpellchecker'))}
spellcheck=${Boolean(ConfigUtil.getConfigItem('enableSpellchecker'))},
worldSafeExecuteJavaScript=true
">
</webview>
`;