Invoke a registered C++ API by canonical <namespace>.<method> name.
Canonical API name in dot notation (e.g. playback.play).
Optionalparams: object
Optional parameter object; structure determined by the registered C++ handler.
Promise resolving to the handler's JSON-serialised return
value, or rejecting with an ErrorEnvelope-shaped object.
Detach a previously registered event handler.
Same canonical name used in NativeFb2k.on.
Reference to the same handler function instance that was originally subscribed.
Subscribe to a C++-emitted event.
Canonical event name in colon notation (e.g.
playback:stateChanged).
Handler invoked with the event payload on every dispatch.
Unsubscribe callback. Calling the returned function detaches the handler.
One-shot subscription; the handler is automatically unsubscribed after the first dispatch.
Native bridge surface injected by the host into the WebView2 page.
Every method shape is intentionally untyped on the value side (
unknown/Record<string, unknown>); higher-level wrappers insrc/bridge/Bridge.tsnarrow the types using the response interfaces from "./responses" and the payload map from "./events".