ensureTsunagiPlayStylefunction
Put the style in the page once: in the document's head, or in the shadow root the host is in.
Import it
import { ensureTsunagiPlayStyle } from "@johnmorrisdotca/tsunagi/play";
Definition
function ensureTsunagiPlayStyle(host: Element): void
Parameters
| Name | Type | Description |
|---|---|---|
host | Element | The DOM host for the native board or its scoped styles. |
Examples
import { ensureTsunagiPlayStyle } from "@johnmorrisdotca/tsunagi/play";
const host = document.createElement("div");
document.body.append(host);
ensureTsunagiPlayStyle(host);
console.log(host.tagName);