Reference · Map, locator and quiz elements
defineLocatorfunction
Register <chizu-locator> or a host's own tag; an existing definition is preserved.
Import it
import { defineLocator } from "@johnmorrisdotca/chizu/element";
Also exported from: @johnmorrisdotca/chizu/element/define
Definition
function defineLocator(tag?: string): void
Parameters
| Name | Type | Description |
|---|---|---|
tag (optional) | string | The custom tag name; omitted to use the package default. |
Examples
import { defineLocator } from "@johnmorrisdotca/chizu/element";
defineLocator("article-locator");
document.body.append(document.createElement("article-locator"));