Remix.run Logo
phyzix5761 4 hours ago

They're not as you can see here[1] and here[2]. They both inherit from the HTMLElement interface but div is considered an HTMLDivElement which makes it distinct from a custom element.

<my-element> != <div>

[1] https://developer.mozilla.org/en-US/docs/Web/API/Web_compone...

[2] https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElem...

moron4hire 2 minutes ago | parent | next [-]

HTMLDivElement has no properties or methods not inherited from HTMLElement. If you inspect the user-agent stylingnof div versus any non-standard named element, you'll see that they have the same styling path. The use of HTMLElement for the non-standard elements is to support future additions to the standard elements and enable subclassing down-tree instead of across-tree, which is noted in the spec.

3 hours ago | parent | prev [-]
[deleted]