Reference · Native Minesweeper player
mountJiraifunction
One playable board in any element. The engine owns the rules, this module owns presses, focus, the clock and the worker. Destroy removes only its own root, so two mounted boards never take each other's listeners or children.
Import it
import { mountJirai } from "@johnmorrisdotca/jirai/play";
Definition
function mountJirai(host: HTMLElement, options?: MountOptions): JiraiMount
Parameters
| Name | Type | Description |
|---|---|---|
host | HTMLElement | The HTMLElement that owns the native interface. |
options (optional) | MountOptions | Native settings and callbacks for this mounted interface. |
Returns
JiraiMount
The native mounted handle, including controls and destroy() cleanup.
Examples
import { mountJirai } from "@johnmorrisdotca/jirai/play";
const show = (host: HTMLElement, options: Parameters<typeof mountJirai>[1]) => mountJirai(host, options);
console.log(typeof show); // functionfunctionWhat it prints (run when this page was built)