What I see is if you define elements before DOM is loaded, when connectedCallback() is called, element has no innards, so making an "HTML Custom Element" is very hard to do. Using mutation observers is extremely fraught because the element may mutate itself and you can get stuck in a loop
Reposted from Dave Copeland
This implies that all elements would have some sort of namespace/prefix, but that seems intended by the requirement that they have a dash. libname-element-name is fine and obvious.

auto-define also doesn't work the way you think if you don't do it in DOMContentLoaded - app dev should control this

Comments