Stops listening, rejects every in-flight request, and aborts every
running onRequest handler. Safe to call more than once. Other methods are
not valid after disposal; only request has a defined post-disposal result
(a rejected promise).
Subscribes to a one-way event sent by the webview. Payloads are untrusted at runtime. Handlers run synchronously; an exception propagates through the platform message callback and prevents later handlers for that event from running, so handle expected failures inside the callback.
Registers the handler for a request the webview may send. The handler's
ctx.signal aborts if the webview cancels the request (or the RPC is
disposed) before the handler settles.
One handler is stored per method. Registering another replaces it; dispose the earlier registration first, because either registration's disposer removes the method entry.
Sends a request to the webview and resolves with its response.
Rejects if the webview responds with an error, if the message could not
be delivered, if options.signal aborts, if options.timeoutMs
elapses, or if the RPC is disposed while the request is in flight.
Optionaloptions: WebviewRpcRequestOptions
A typed, bidirectional request/response + event channel layered over a
vscode.Webview's rawpostMessage/onDidReceiveMessage. See createWebviewRpc.