Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vscode-webview-rpc

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-webview-rpc

![Version](https://img.shields.io/badge/version-0.0.1-blue.svg?cacheSeconds=2592000) ![Prerequisite](https://img.shields.io/badge/node-%3E%3D10-blue.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](#)

  • 0.0.4
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Welcome to vscode-webview-prc 👋

Version Prerequisite License: MIT

a rpc lib for vscode webview extension development

Prerequisites

  • node >=10

Install

yarn add vscode-webview-rpc

Usage

extension rpc

import * as vscode from 'vscode';
import { ExtensionRPC } from 'vscode-webview-rpc';


const panel = vscode.window.createWebviewPanel(
			'EditPanel',
			'Blog Editing',
			column || vscode.ViewColumn.One,
			getWebviewOptions(extensionUri),
	);

const RPC = new ExtensionRPC(panel.webview);

RPC.on('log',(e)=>{
  console.log(e);
  return Promise.resolve();
});

webview rpc

import { WebviewRPC } from 'vscode-webview-rpc';

declare var acquireVsCodeApi: any;

let RPC:WebviewRPC;

(()=>{
   RPC = new WebRPC(window, vscode);
   setTimeout(()=>{
     RPC.emit('log',["hello world"]);
   },2000);
})();


Author

👤 aaronphy

Show your support

Give a ⭐️ if this project helped you!


This README was generated with ❤️ by readme-md-generator

FAQs

Package last updated on 21 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc