提交 3b8a3ca2 编写于 作者: M Matt Bierner

Enable contextisolation in webviews

上级 32566fd1
......@@ -21,7 +21,6 @@ declare interface WebviewElement extends HTMLElement {
autoSize: 'on';
preload: string;
contextIsolation: boolean;
send(channel: string, ...args: any[]);
openDevTools(): any;
}
......@@ -70,6 +69,7 @@ export default class Webview {
this._webview.setAttribute('disableblinkfeatures', 'Auxclick');
this._webview.setAttribute('disableguestresize', '');
this._webview.setAttribute('webpreferences', 'contextIsolation=yes');
this._webview.preload = require.toUrl('./webview-pre.js');
this._webview.src = require.toUrl('./webview.html');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册