API reference
html
Import
Section titled “Import”import * as api from "@fungi.computer/whistle/html";Exports
Section titled “Exports”| 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”type HtmlWhistleBinding = Readonly<{ keymap: ReturnType<typeof createDefaultHtmlKeymap>; dispose: () => void;}>;Maintained document keymap plus disposable Whistle command projection.
bindHtmlKeymap()function
Section titled “bindHtmlKeymap()”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
root |
HTMLElement |
whistle |
Pick<WhistleRuntime, "snapshot" | "subscribe" | "execute"> |
origin |
WhistleExecutionOrigin |