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:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mjbvzcommented, Apr 24, 2019

The options objects are immutable but Webview.options is mutable

1reaction
rkeithhillcommented, Feb 1, 2019

I 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?

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 >
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 >

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