When, if ever, will HTML support template stamping
edref.neocities.orgAs 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...
In my opinion, whether or not a website uses JS is orthogonal to this (though, I would argue websites shouldn't need JS just to repeat some elements). The issue is web has changed from JS enhancing a structure defined by HTML to JS subsuming the role of the web entirely (see HTML-in-JS, CSS-in-JS). Perhaps the greatest issue is that people don't realise that this is an issue.
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.
I think this is a good change. Even repeating some elements is an example of looping, a Turing behavior that should be left to JS. We're way past the point where some predefined markup can accommodate most sites. Even "brochureware" sites can be built and maintained easier with programmatic code rather than static definitions of page layouts and content.
I think the "purity" of HTML as a web language is a myth. HTML is an application of SGML, just like XML. It was designed to describe documents, not programs. Most people today would benefit from building a web application rather than a document.
I think you're right. It's a good change for people who want to build web applications. Maybe that's the right thing for future development ease. I feel it's a shame though, the de-emphasis of web documents leads to more content being centralized on large platforms like Facebook, Medium, etc. People at the small scale don't benefit as much from programmability. It leads to a less open and inclusive web.
Also true! The overhead of a custom site is now way more than it used to be and that limits adoption.