Interface: IExtensionRpcTransport
Defined in: Extensions/IExtensionRuntime.ts:79
The minimal transport the runtime needs to talk to the host. The host
provides this when constructing the runtime — typically wrapping a
MessagePort from MessageChannelMain (worker) or a Window.postMessage
channel (iframe).
Methods
close()
close():
void
Defined in: Extensions/IExtensionRuntime.ts:88
Tear down the transport. Idempotent.
Returns
void
onMessage()
onMessage(
handler):void
Defined in: Extensions/IExtensionRuntime.ts:86
Register a handler for incoming envelopes. The runtime owns the only subscription; the transport may invoke it synchronously or asynchronously.
Parameters
handler
(envelope) => void
Returns
void
send()
send(
envelope):void
Defined in: Extensions/IExtensionRuntime.ts:80
Parameters
envelope
Returns
void