E116

Error

Syntax and structure

E116 — A tag that cannot be a custom element's

Element names a custom element by its tag, first and as a string: lower case, with a hyphen ("stripe-pricing-table").

What the compiler said

error[E116]: `pricingtable` is not a custom element's tag --> src/App.wf:3:5 | 3 | Element("pricingtable") | ^^^^^^^ = help: A custom element's tag is lower case with a hyphen: `Element("stripe-pricing-table", …)` = docs: https://webfluent.monzeromer.dev/errors/E116

The fix

Broken

wf

page P(path: "/", title: "T", description: "D") { Heading("Pricing").h1 Element("pricingtable") }

Fixed

wf

page P(path: "/", title: "T", description: "D") { Heading("Pricing").h1 Element("pricing-table") }

A custom element's tag is lower case with a hyphen: Element("pricing-table").

Each example is a whole program: it is all of src/App.wf in a project with no other .wf file (trying an example).

lints cannot lower it: it would ship a broken page.