Closed lud closed 4 years ago
Custom elements are still valid elements. No need to register them via JS if they won't feature any dynamic behaviour.
However the proposed syntax for custom elements is <prefix-tagname>
as in <grid-container>
, <grid-column>
, <foo-bar>
. Browsers accept custom elements using HTMLElement
interface, or the HTMLUnknownElement
interface, which is "invalid" but still works because it inherits from HTMLElement
, it just won't have a semantic value, nor specific properties (similar to a <span>
). Also W3 validator accepts custom elements as long as they use a dash in the name. Most importantly the browser won't crash, it will just render an inline, unstyled, element without semantic value.
Reference:
Ok thank you
It seems not, but how do I know it would work on all browsers ?
Maybe the docs should have a little paragraph about it.