There used to be a thing for this
https://caniuse.com/imports
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.
Says "superseded by ES modules". Not really the same thing, right?
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.
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.