diff --git a/src/vs/workbench/parts/html/browser/webview.ts b/src/vs/workbench/parts/html/browser/webview.ts
index ea9b22fd2b2ecf8a1131ba380f3fae051cfd2ec8..fc858d2ea198d5c84bffd23d92aa8323618f9df0 100644
--- a/src/vs/workbench/parts/html/browser/webview.ts
+++ b/src/vs/workbench/parts/html/browser/webview.ts
@@ -20,6 +20,7 @@ declare interface WebviewElement extends HTMLElement {
src: string;
autoSize: 'on';
preload: string;
+ contextIsolation: boolean;
send(channel: string, ...args: any[]);
openDevTools(): any;
@@ -59,6 +60,7 @@ export default class Webview {
this._webview.style.outline = '0';
this._webview.style.opacity = '0';
this._webview.autoSize = 'on';
+ this._webview.contextIsolation = true;
// disable auxclick events (see https://developers.google.com/web/updates/2016/10/auxclick)
this._webview.setAttribute('disableblinkfeatures', 'Auxclick');