Skip to content

ui/shell/bridge

Defined in: app/src/ui/shell/bridge.ts:63

Typed access to the browser process from the shell.

new ShellBridge(raw): ShellBridge

Defined in: app/src/ui/shell/bridge.ts:67

PreloadBridge

The preload bridge, window.bridge.

ShellBridge

invoke<K>(channel, request): Promise<ResponseOf<Requests[K]>>

Defined in: app/src/ui/shell/bridge.ts:76

Calls a request channel.

K extends keyof Requests

K

The channel.

RequestOf<Requests[K]>

The request; the browser process validates it again.

Promise<ResponseOf<Requests[K]>>

on<K>(channel, listener): () => void

Defined in: app/src/ui/shell/bridge.ts:90

Listens to an event channel.

K extends keyof Events

K

The channel.

(payload) => void

Receives each payload.

A function that removes the listener.

() => void