Online since 1990 Yes! I started with Gopher. I do modern Web Component Development with technologies supported by **all** WHATWG partners (Apple, Google, Microsoft & Mozilla)
Well, technically you're right. And yes, using such elements without constructor might be very useful.
But in the context of this article, we were specifically talking about the Custom Elements API. Without initialization through this API, it's an instance of HTMLUnknownElement. So, we could say its lifecycle hasn't yet begun.
Online since 1990 Yes! I started with Gopher. I do modern Web Component Development with technologies supported by **all** WHATWG partners (Apple, Google, Microsoft & Mozilla)
Yep, It's almost the same (depends on browser version) and doesn't make any additional sense at this whole context. But I like your your desire for precision.
Online since 1990 Yes! I started with Gopher. I do modern Web Component Development with technologies supported by **all** WHATWG partners (Apple, Google, Microsoft & Mozilla)
> A Custom Element's lifecycle starts at the constructor.
Not correct.
The Custom Element lifecycle starts when a
<tag-name>(with a hyphen!) is created.HTMLElementcustomElements.definecan upgrade these UNdefined Custom Elementsconstructorfirst<tagname>(no hyphen!) areHTMLUnknownElemen(and can't be upgraded)Web Components / Custom Elements often get off to the wrong start because most blogs and documentation skip this first step.
Well, technically you're right. And yes, using such elements without constructor might be very useful.
But in the context of this article, we were specifically talking about the Custom Elements API. Without initialization through this API, it's an instance of HTMLUnknownElement. So, we could say its lifecycle hasn't yet begun.
No, its not
Yep, It's almost the same (depends on browser version) and doesn't make any additional sense at this whole context. But I like your your desire for precision.
Which Browser makes
<my-element>anything BUT a HTMLElement?But to be precise, yes, you are correct, Internet Explorer will say its an HTMLUnknownElement