Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>vsWebViewNew to Visual Studio Code? Get it now.

vsWebView

I513504

|
912 installs
| (0) | Free
WebView extension for vsCode
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

A Webview API Sample

Demonstrates VS Code's webview API. This includes:

  • Creating and showing a basic webview.
  • Dynamically updating a webview's content.
  • Loading local content in a webview.
  • Running scripts in a webview.
  • Sending message from an extension to a webview.
  • Sending messages from a webview to an extension.
  • Using a basic content security policy.
  • Webview lifecycle and handling dispose.
  • Saving and restoring state when the panel goes into the background.
  • Serialization and persistence across VS Code reboots.

VS Code API

vscode module

  • window.createWebviewPanel
  • window.registerWebviewPanelSerializer

Running the example

  • Open this example in VS Code 1.25+
  • npm install
  • npm run watch or npm run compile
  • F5 to start debugging

Run the Open web page in webview to create the webview.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft