davatron5000 / awesome-standalones

A curated list of awesome framework-agnostic standalone web components
1.31k stars 46 forks source link

What are "Element Extensions"? #15

Closed ccprog closed 2 months ago

ccprog commented 3 years ago

Could you please explain what constitutes an element "that extends or adds to an existing semantic element"? Obviously you are not referring to Customized Built-in Elements, since the elements you list are all expanding the HTMLElement interface. They also do not seem to re-implement some specific interface (the <details-xx> elements have no open attribute, the <file-drop> element would not work as an input element in a form).

To ask a more precise question: if the term "extension" does not refer to class inheritance, is there an unambiguous way to identify which element is expanded, or is it only a matter of an intuitive "it reminds me of" without a technical spec being followed?

I am aware that extending other interfaces but HTMLElement is not supported by Safari, so I am not trying to promote a part of the Standard that seems to be controversial, I am only trying to understand your classification.

davatron5000 commented 3 years ago

What I mean by "Element Extensions" are elements that function like existing elements (e.g. <time> but add enhancements like relative time). Some of them either wrap, extend, or emulate the behavior of an existing element. It's less about classical programmatic inheritance and more about look and feel to the end user. So it's definitely in the "it reminds me of" vibe.

IMO, most custom elements extend HTMLElement because Safari has nixed the concept of is="" and extending other classes.

daviddarnes commented 2 months ago

Closing as this was answered and no there was no follow up…