mirror of
https://github.com/cdr/code-server.git
synced 2025-12-06 16:34:35 +01:00
Allow webview iframe to load styles
This commit is contained in:
parent
e597d49912
commit
3155eb76f5
1 changed files with 1 additions and 0 deletions
|
|
@ -141,6 +141,7 @@ const newCreateElement = <K extends keyof HTMLElementTagNameMap>(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({
|
||||
|
|
|
|||
Loading…
Reference in a new issue