Reference · Board and position elements
defineBoardfunction
Defines the default playable board, or a subclass under a custom tag. Server-safe and idempotent.
Import it
import { defineBoard } from "@johnmorrisdotca/sugoroku/element";
Also exported from: @johnmorrisdotca/sugoroku/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/sugoroku/element";
defineBoard();
console.log(typeof defineBoard); // functionfunctionWhat it prints (run when this page was built)