question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrade to VS Code's webview API

See original GitHub issue

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 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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mjbvzcommented, Feb 1, 2019

Just a heads up: in VS Code 1.32 (the February update), using the previewHtml command will show an alert to the user, although the command should still work. We plan to remove the command entirely with VS Code 1.33 (March update)

1reaction
seanpoultercommented, Nov 28, 2018

Thanks for the suggestion to use Gitter. I’ve opened #407 to see who’s interested and if they can pay attention to a Gitter channel. It sounds like it could help but I’m worried it’ll take our time away from all these Issues and PRs. 😉

Any thoughts on what we need to fix for the webview API?

Read more comments on GitHub >

github_iconTop 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 >
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 >
How To Add Webviews to a Visual Studio Code Extension
The documentation scares you from using the webview API, warning that it can slow down the application. But a tree view wasn't working...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found