Reference
Register the board
import { … } from "@johnmorrisdotca/tsunagi/element/define";
251.5 kB minified and gzipped, with everything it imports (measured with esbuild)
Defines the <tsunagi-board> element on the page. Import it for its effect:
<script type="module" src="https://cdn.jsdelivr.net/npm/@johnmorrisdotca/tsunagi@1/dist/element-define.js"></script>
<tsunagi-board size="6" level="3"></tsunagi-board>A tag already defined is left as it is, and on a server, where there is no page, nothing happens.
Exports
| Name | Kind | What it is |
|---|---|---|
defineBoard | function | Register a standard or custom board tag, preserving a definition. |
TSUNAGI_EMBED_OPTION_KEYS | constant | Every mounted-board option, kept complete by TypeScript and checked by the builder. |
TsunagiBoard | class | Native custom element with reflected setup and presentation. |
TsunagiElementOptions | type | Host callbacks and custom drawing palettes, which cannot be put in an attribute. |