Skip to content
API reference

ui-browser

Import
import * as api from "@fungi.computer/knapsack/ui/browser";
Kind Export Description
class UiBrowserError Browser-side platform failure before a correlated result is accepted.
type alias BrowserConnectionOptions One Agent Session’s browser transport and the App’s command runtime.
type alias BrowserConnection A live browser connection; close it when the selected Session changes.
function connectBrowser() Start the named browser Promise facade over the Effect connection program.

Browser-side platform failure before a correlated result is accepted.

  • Error
Signature
new UiBrowserError(message, options?): UiBrowserError;
Parameter Type
message string
options? ErrorOptions

UiBrowserError

Signature
Error.constructor;

BrowserConnectionOptionstype alias

Section titled “BrowserConnectionOptions”
Signature
type BrowserConnectionOptions = Readonly<{
baseUrl: string;
whistle: Pick<WhistleRuntime, "snapshot" | "execute">;
transport?: Readonly<{
fetch: typeof globalThis.fetch;
openEvents: (url) => EventTarget & object;
}>;
}>;

One Agent Session’s browser transport and the App’s command runtime.


BrowserConnectiontype alias

Section titled “BrowserConnection”
Signature
type BrowserConnection = Readonly<{
closed: Promise<void>;
close: () => void;
}>;

A live browser connection; close it when the selected Session changes.

connectBrowser()function

Section titled “connectBrowser()”
Signature
function connectBrowser(options): BrowserConnection;

Start the named browser Promise facade over the Effect connection program.

Parameter Type
options BrowserConnectionOptions

BrowserConnection