V10
Warning
Vocabulary
V10 — A Host tag it does not make
A Host is made of one of a few elements — div, span, canvas, svg, section, figure, pre, p, ul, table; any other tag is a div.
What the compiler said
warning[V10]: `Host` makes no `video`, so it is a `div` --> src/App.wf:3:10 | 3 | Host(tag: "video", mount: (n) => n) | ^^^ = help: It makes `div`, `span`, `canvas`, `svg`, `section`, `figure`, `pre`, `p`, `ul`, `table` = docs: https://webfluent.monzeromer.dev/errors/V10
The fix
Broken
page P(path: "/", title: "T", description: "D") {
Heading("Chart").h1
Host(tag: "video", mount: (n) => n)
}
Fixed
page P(path: "/", title: "T", description: "D") {
Heading("Chart").h1
Host(tag: "canvas", mount: (n) => n)
}
Make it one of the tags Host makes, or use the element the
built-ins offer for it (Video, Audio, Image).
Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).
Why this rule exists
A Host is made of one of a few elements: div, span, canvas, svg,
section, figure, pre, p, ul or table — the tag is written into
the document, so it is an allow-list rather than whatever the string says.
Any other tag is a div.
lints may lower it:
"lints": { "V10": "off" }
// wf-allow(V10)