6 ms·
<object> used like this is just a poor iframe in a much shakier spot in the standards, mostly for backwards compatibility. Like iframe, it "includes" a full su
by nephyrin 1y ago
<object> used like this is just a poor iframe in a much shakier spot in the standards, mostly for backwards compatibility.
Like iframe, it "includes" a full subdocument as a block element, which isn't quite what the OP is hinting at.
- gpvos 1y agoSound like it's good enough for headers and footers, which is 80% of what people need.
- j45 1y agoWhether it’s good enough or not it does exist and everyone can decide if it works for them. I’d probably explore WebComponents, but wanting the height of JavaScript without JavaScript..
- masklinn 1y agoThat’s what lots of sites used to do in the late 90s and early aughts in order to have fixed elements. It was really shit. Browser navigation cues disappear, minor errors will fuck up the entire thing by navigating fixed element frames instead of contents, design flexibility disappears (even as consistent styling requires more efforts), frames don’t content-size so will clip and show scroll bars all over, debugging is absolute ass, … And it increases resource use.
- j45 1y agoIt’s not ideal, but t it does exist in pure html… and the OP didn’t seem to note it. A bit of vanilla JavaScript with WebComponents is a few lines: https://gomakethings.com/html-includes-with-web-components/ https://gomakethings.com/html-includes-with-web-components/ Edit: “t” was supposed to be the object tag.
- masklinn 1y ago> it does exist in pure html [...] JavaScript with WebComponents You seem to have a rather original definition of "pure HTML".
- j45 1y agoTypo, from the numerous fat finger typos you see above. :) An html only option that exists is using object. Replying to the miss of the OP in case others might find it suitable. If a tiny bit of vanilla JavaScript can be tolerated, WebComponents appear to have a broad standardized approach that is not framework dependant.
- j45 1y agoIt’s an option built into html. The OP doesn’t need to hint.