3 ms·
> . Repeated document fragments have been a pattern since the very beginning of HTML. This is a missing feature. With webcomponents, it's now trivial to do cli
by lelanthran 2y ago
> . Repeated document fragments have been a pattern since the very beginning of HTML. This is a missing feature.
With webcomponents, it's now trivial to do client-side includes. It's not really a missing feature anymore. See this post here (which, for some reason is being downvoted): https://news.ycombinator.com/item?id=40847759 https://news.ycombinator.com/item?id=40847759
- vaylian 2y agoI like web components. But they require JavaScript. I'm thinking about something that is pure HTML.
- lelanthran 2y ago> But they require JavaScript. Sure, but only for implementing your own. In practice they don't typically require the author of the page to know any Javascript. I'm using a client-side include by writing only HTML tags (with a 'remote-src' attribute). It's no different from not having to know C++ in order to write HTML which is rendered by C++ code. The implementation just doesn't matter, because the user (in this case the page/site author) never needs to examine it.