DEV Community

Discussion on: Web components in 2021: the Good, the Bad and the Ugly

Collapse
 
dannyengelman profile image
Danny Engelman

One point to add.

Web Component technology is older and more used than most people know.

The <video>, <audio>, <textarea>, <input> and many more complex HTML tags
are implemented in each Browser with Web Component (like) technology.

In Chromium you can tell by the user-agent (= tech term for Browser) label on the shadow-root:

Us mortal developers can not access the HTML elements inside user-agent shadow-root.

Also see: javascript.info/shadow-dom

But... that technology was not available to us 3rd party developers

What we now call "Web Components" (Custom Elements API, Templates, shadowDOM)

IS that very same technology available to us all

But we can't access user-agent managed shadowDOM! (or "closed") shadowRoots)

So everyone who claims Web Components is young, not yet fleshed out, bare metal, hardly used, technology... does not understand how the Browser works.

Collapse
 
emileperron profile image
Émile Perron

It's true that the underlying technology isn't new, and has been out there and in use by browsers for a rather long time.

However, usage by the masses in their own websites and applications is different than internal usage by browser developers, so it's not untrue that the technology, to the eyes of the public, is fairly young and hardly used. I think that'll change in the future though.

Collapse
 
dannyengelman profile image
Danny Engelman • Edited

When does hardly used then gets to the next stage?

chromestatus.com/metrics/feature/t...

Says: "over 10% of Chrome browsed websites, use ``customElements.define"

And that is with (about) half of all Social Media "Web Components" posts,
partly focussing on the "bad" aspects.

And if your stats are based on what Web Components you detect in F12 Dev Tools...

You could be wrong, because active Web Components could have done their work and removed themselves: dev.to/dannyengelman/the-lt-site-h...