|
|
|
|
|
by dtagames
850 days ago
|
|
As a heavy user[0] of the existing web components standard, I think this is unnecessary. The only rationale given here for another kind of web component is to be able to do it without JavaScript. That's not really necessary. Most component based websites are going need to need JS and many are entirely JS/TS-based (like SPAs and static apps that are served as a single file.) A web component without JS could only nest other standard or custom web components. It couldn't do anything to them or their data (attributes, properties). What would be the point? The real use case for web components is creating HTML blocks with both behavior and layout attached to them. To get the behavior, we need JS and we often need it to figure out the layout, too. (If this, then show that, etc.) [0] https://medium.com/gitconnected/getting-started-with-web-com... |
|
It's a useful paradigm for people making highly dynamic websites like Google Maps but the vast majority of websites are not Google Maps. Since 2011, browser vendors and standards bodies have expended an astronomical amount of time, effort and resources into designing and implementing the Web Components spec. The resources used to develop Web Components came at the expense of other features that could have improved the web. More than a decade later, adoption into non-Google websites is a rounding error.
Web Components are designed as a behavior (JS) first standard, not a structure (HTML) first standard. This is not the way many websites are designed, it's evident in the popularity of structure-first frameworks like Vue and htmx. You can't force a website into a web application shaped hole.