Skip to content
Snippets Groups Projects
Select Git revision
  • 284646198b7c40865d9aaaebf717ba08185a6bbd
  • master default protected
  • docs-improve_user_path_description
  • fix-pipeline
  • ci-change_exercises_image_registry
  • feat-merge_recorder_in_extension
  • feat-default_folder
  • feat-change_user
  • develop protected
  • refactor-mission
  • feat-exercise_automatic_save
  • docs-improve_documentation
  • feat-create_little_container_for_developer
  • feat-local-dev
  • 0.1.12
  • 0.1.11
  • 0.1.10
  • 0.1.5
18 results

deadlock-extension

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Alex authored
    28464619
    History

    Cat Coding — 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.

    Demo

    demo

    VS Code API

    vscode module

    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 Cat Coding: Start cat coding session to create the webview.