Host
Layout
A bare node handed to somebody else's code, with a lifetime. mount: runs with the node each time it is made, update: again whenever the state it reads changes, and cleanup: when the page, branch or list item it belongs to leaves. Every other element takes the same three.
Host(tag: …)
Example
Host(tag: "canvas", mount: (node) => node.getContext("2d"), cleanup: (ctx) => log("gone"))
Renders with the class wf-host, stable across releases, so a stylesheet may target it.
| Prop | Type | Meaning |
|---|---|---|
| tag: | String |
The element to make: |
Attribute families: global, aria, data. Plus the universal props on every element: animate:, exit:, speed:, class:, ref:.