diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts index 08ab5e391d6f404785b9583a09336ef1ffc081b7..255495a714e8a1b5ca09890e59728308eb7ece37 100644 --- a/src/vs/workbench/parts/html/browser/webview.ts +++ b/src/vs/workbench/parts/html/browser/webview.ts @@ -21,9 +21,7 @@ import { IContextKey } from 'vs/platform/contextkey/common/contextkey'; declare interface WebviewElement extends HTMLElement { src: string; - autoSize: 'on'; preload: string; - contextIsolation: boolean; send(channel: string, ...args: any[]); openDevTools(): any; getWebContents(): any; @@ -102,18 +100,17 @@ export default class Webview { this._webview.setAttribute('partition', `webview${Webview.index++}`); } - this._webview.style.width = '100%'; - this._webview.style.height = '100%'; - this._webview.style.outline = '0'; - this._webview.style.opacity = '0'; - this._webview.contextIsolation = true; - // disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick) this._webview.setAttribute('disableblinkfeatures', 'Auxclick'); this._webview.setAttribute('disableguestresize', ''); this._webview.setAttribute('webpreferences', 'contextIsolation=yes'); + this._webview.style.width = '100%'; + this._webview.style.height = '100%'; + this._webview.style.outline = '0'; + this._webview.style.opacity = '0'; + this._webview.preload = require.toUrl('./webview-pre.js'); this._webview.src = require.toUrl('./webview.html');