Skip to main content

Crate slt_wasm

Crate slt_wasm 

Source
Expand description

WASM/browser backend for SuperLightTUI.

Renders an SLT Context into a grid of <span> elements inside a host container and drives it from requestAnimationFrame, translating DOM keyboard/mouse/wheel/resize/paste events into SLT Events.

Structs§

DomBackend
SLT Backend that paints into a DOM <pre>/<span> grid and diffs against the previously flushed frame so only changed cells are rewritten.
WasmAppHandle
Owned browser runtime handle returned by run_wasm_with_handle.
WasmOptions
Mount-time options specific to the browser runtime, not the terminal.

Functions§

run_wasm
Mount app into container and run it until it requests exit.
run_wasm_raw
wasm-bindgen entry point that mounts an empty SLT app into container.
run_wasm_raw_handle
wasm-bindgen entry point that mounts an empty SLT app and returns a disposable handle.
run_wasm_with_handle
Mount a fixed grid with default browser options and retain its runtime owner.
run_wasm_with_options
Mount a browser application with explicit mount-time configuration.