logoalt Hacker News

tln05/03/20253 repliesview on HN

There used to be a thing for this

https://caniuse.com/imports


Replies

tehbeard05/03/2025

No HTML imports was an idea of using the HTML document format to encapsulate the 3 distinct data types needed for custom elements:

- JS for functionality via the custom elements API - HTML for layout via <template> tags. - CSS for aesthetics via <style> tags.

Not for just quickly and simply inserting the contents of header.html at a specific location in the DOM.

HeavyStorm05/03/2025

Says "superseded by ES modules". Not really the same thing, right?

show 1 reply
moffkalast05/04/2025

Chad QQ and UC browsers, the only ones still supporting HTML imports lmao. I've never heard of them before but I like the cut of their jib.