How to use the @sap-devx/webview-rpc/out.browser/rpc-browser.RpcBrowser function in @sap-devx/webview-rpc

To help you get started, we’ve selected a few @sap-devx/webview-rpc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SAP / yeoman-ui / frontend / src / App.vue View on Github external
setupRpc() {
      if (this.isInVsCode()) {
        // eslint-disable-next-line
        window.vscode = acquireVsCodeApi()
        this.rpc = new RpcBrowser(window, window.vscode)
        this.initRpc()
      } else {
        const ws = new WebSocket("ws://127.0.0.1:8081")
        ws.onopen = () => {
          this.rpc = new RpcBrowserWebSockets(ws)
          this.initRpc()
        }
      }
    },
    initRpc() {

@sap-devx/webview-rpc

An RPC library for VSCode WebViews

Apache-2.0
Latest version published 3 months ago

Package Health Score

82 / 100
Full package analysis

Similar packages