6 ms·
I'm not sure I follow? I think the GP was just talking about the ability to import other HTML fragments without JS? Something like: <fragment href="site-menu
by johnmw 3y ago
I'm not sure I follow? I think the GP was just talking about the ability to import other HTML fragments without JS? Something like:
<fragment href="site-menu.html"/>
Which would load my shared site wide menu html into the parent div.
I'm not sure why JS would be needed here? (i.e in the same way html <select> elements are interactive without needing "JS").
Going a little more out there, what about cross domain imports for easy web component consumption?
<fragment href="https://weather-widget.org?location=london" />
I can't see how this would be less secure than current cross domain JS imports?
It used to be sorta possible with HTML Imports but that spec got dropped [1].
[1] https://www.w3.org/TR/html-imports/ https://www.w3.org/TR/html-imports/