From 3155eb76f5856df2ce4db753286f2d4d49c29cef Mon Sep 17 00:00:00 2001 From: Asher Date: Tue, 12 Mar 2019 12:55:43 -0500 Subject: [PATCH] Allow webview iframe to load styles --- packages/ide/src/fill/electron.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ide/src/fill/electron.ts b/packages/ide/src/fill/electron.ts index ac4d55614..a239133f8 100644 --- a/packages/ide/src/fill/electron.ts +++ b/packages/ide/src/fill/electron.ts @@ -141,6 +141,7 @@ const newCreateElement = (tagName: K): HT // TODO args[0].contents = (args[0].contents as string).replace(/"(file:\/\/[^"]*)"/g, (m1) => `"/resource${m1}"`); args[0].contents = (args[0].contents as string).replace(/"vscode-resource:([^"]*)"/g, (m, m1) => `"/resource${m1}"`); + args[0].contents = (args[0].contents as string).replace(/style-src vscode-core-resource:/g, "style-src 'self'"); } if (view.contentWindow) { view.contentWindow.postMessage({