Upgrade to VS Code's webview API
See original GitHub issueHi, I’m on the VS Code team. I noticed that your extension uses the vscode.previewHtml
command which is deprecated and which we are actively working to remove: https://github.com/Microsoft/vscode/issues/62630
We’ve developed a webview API that provides a much better developer experience and offers a number of important security and compatibility benefits over previewHtml
. We cannot fix previewHtml
without breaking backwards compatibility, and have instead opted to remove it.
To ensure that your extension continues to work properly in VS Code, please try upgrading to use the new Webview API. You can find documentation on the API usage here. Let me know if you have any questions or concerns about this migration
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Webview API - Visual Studio Code
The webview API allows extensions to create fully customizable views within Visual Studio Code. For example, the built-in Markdown extension uses webviews ......
Read more >Upgrade to VS Code's webview API · Issue #1255 - GitHub
Hi, I'm on the VS Code team. I noticed that your extension uses the vscode.previewHtml command which is deprecated and which we are...
Read more >Webview - is it possible to update only a portion of the view?
I'd like to have a timer running ( setInterval() ) and either have an element blink on/off, or change an element's color (maybe...
Read more >How to Build a Webview-Powered VS Code Extension with LWC
Building interactive extensions for Visual Studio Code (VS Code) is not always easy when you use the built-in functionality.
Read more >vscode.Webview - Haxe externs for Visual Studio Code
To send message from the webview back to an extension, use the acquireVsCodeApi function inside the webview to get a handle to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The options objects are immutable but
Webview.options
is mutableI started the switch over but am having a bit of a tough go at it. Folks who use this feature with the PowerShell extension expect to be able to run their own personal JavaScript files (not under some extension’s subdir). They tend to put these JS files in a workspace or their home dir. I guess I could inline the JavaScript in the HTML?