Documentation
¶
Overview ¶
Package wasm provides WASM component helpers for Vango.
Deprecated: The v1 Developer Guide exposes WASM components via `el.WASMComponent`. This package is retained for legacy/internal use only.
WASM components run client-side and communicate with the server via message passing.
Usage (v1 canonical):
Div(
WASMComponent("canvas", map[string]any{"tool": "pen"}),
)
Client modules are loaded from /js/wasm/<id>.js by default unless overridden with WASMModule. Modules should export a mount(el, props, api) function that can optionally return {update, destroy, onMessage}.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendToWASM ¶
SendToWASM sends a message to the client-side WASM component.
func SetupOnWASMMessage ¶
SetupOnWASMMessage registers a handler for messages from the WASM component during Setup. This is the spec-aligned Setup-only variant.
func WASMComponent ¶
WASMComponent marks an element as a WASM component boundary. For custom module paths, set WASMModule on the same element.
func WASMModule ¶
WASMModule overrides the default module path for a WASM component.
Types ¶
This section is empty.