3 ms·
That's the first thing listed in the article? "Javascript to go fetch the HTML and insert it". What they're after is something that's _just_ HTML and not anothe
by CamouflagedKiwi 1y ago
That's the first thing listed in the article? "Javascript to go fetch the HTML and insert it". What they're after is something that's _just_ HTML and not another language.
- sreekotay 1y agoWhile you do need a server i think this is the functional equivalent? The fetch JS and insert outlined (linked to) in the article is async. This blocks execution like you'd expect an HTML include to do. It's WAY easier to reason about - which is why the initial ask, I think...
- j45 1y agoThe <object> tag appears to include/embed other html pages. An embedded HTML page: <object data="snippet.html" width="500" height="200"></object> https://www.w3schools.com/tags/tag_object.asp https://www.w3schools.com/tags/tag_object.asp
- sreekotay 1y agohunh - THAT's cool. Learn something new every day. That said - it does appear encapsulated, much like an iframe - css doesn't take, etc. so though more "pure" HTML I'd argue doesn't fulfill the spirit of "include"?