WebviewPanel is not loading in 16.0.0 #615
-
I created a webview panel using the Webview API. The method I used to create it looks something like this: private async webview(): Promise<void> {
const panel = vscode.window.createWebviewPanel('catCoding', 'Cat Coding', vscode.ViewColumn.One, {});
panel.webview.html = `<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cat Coding</title>
</head>
<body>
<img src="https://media.giphy.com/media/JIX9t2j0ZTN9S/giphy.gif" width="300" />
</body>
</html>`;
} It works well until version 15.0.3 ...but it no longer works in version 16.0.0. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for the report note that it's because of the service worker not being registered on the proper scope, so it currently depends on the bundler configuration, that's why it works on https://monaco-vscode-api.netlify.app/?mode=full-workbench The change makes sure the html and the service worker are next to each others, so there's no reason for the bundler to expose them in difference pathes 🤔 |
Beta Was this translation helpful? Give feedback.
-
Can you give the v16.0.6 a try? |
Beta Was this translation helpful? Give feedback.
Thanks for the report
note that it's because of the service worker not being registered on the proper scope, so it currently depends on the bundler configuration, that's why it works on https://monaco-vscode-api.netlify.app/?mode=full-workbench
The change makes sure the html and the service worker are next to each others, so there's no reason for the bundler to expose them in difference pathes 🤔