Reference · Minesweeper element
defineBoardfunction
Registers the default board, or a subclass under a host's custom tag. Server-safe and idempotent.
Import it
import { defineBoard } from "@johnmorrisdotca/jirai/element";
Also exported from: @johnmorrisdotca/jirai/element/define
Definition
function defineBoard(tagName?: string, registry?: CustomElementRegistry | undefined): void
Parameters
| Name | Type | Description |
|---|---|---|
tagName (optional) | string | The custom tag name; omitted to use the package default. |
registry (optional) | CustomElementRegistry | undefined | The custom-element registry; omitted outside a browser. |
Examples
import { defineBoard } from "@johnmorrisdotca/jirai/element";
defineBoard();
console.log(typeof defineBoard); // functionfunctionWhat it prints (run when this page was built)