Skip to content
API reference

html

Import
import * as api from "@fungi.computer/whistle/html";
Kind Export Description
type alias HtmlWhistleBinding Maintained document keymap plus disposable Whistle command projection.
function bindHtmlKeymap() Bind Whistle commands to the maintained OpenTUI HTML keymap. The root owns the host’s document lifetime; dispose removes the command projection only.

HtmlWhistleBindingtype alias

Section titled “HtmlWhistleBinding”
Signature
type HtmlWhistleBinding = Readonly<{
keymap: ReturnType<typeof createDefaultHtmlKeymap>;
dispose: () => void;
}>;

Maintained document keymap plus disposable Whistle command projection.

bindHtmlKeymap()function

Section titled “bindHtmlKeymap()”
Signature
function bindHtmlKeymap(root, whistle, origin): HtmlWhistleBinding;

Bind Whistle commands to the maintained OpenTUI HTML keymap. The root owns the host’s document lifetime; dispose removes the command projection only.

Parameter Type
root HTMLElement
whistle Pick<WhistleRuntime, "snapshot" | "subscribe" | "execute">
origin WhistleExecutionOrigin

HtmlWhistleBinding