top | item 43879241 (no title) axelfontaine | 10 months ago Iframes, while not perfect, are pretty close though... discuss order hn newest lelandfe|10 months ago Making iframes be the right size is super awkward. I might actually use them more if they were easy to get responsive.This post does link to a technique (new to me) to extract iframe contents: <iframe src="/example.html" onload="this.before((this.contentDocument.body||this.contentDocument).children[0]);this.remove()"></iframe> dleeftink|10 months ago I've come across this technique here [0] to try it on <object> elements, but sizing is even more difficult there.[0]: https://www.filamentgroup.com/lab/html-includes/ cratermoon|10 months ago Are we solving the information-centric transclusion problem, or the design-centric asset reuse problem? An iframe is fine for the former but is not geared towards design and layout solutions. load replies (1) webstrand|10 months ago Iframes fundamentally encapsulate html documents, not fragments. rendaw|10 months ago Interaction between elements in different iframes is very restricted. danans|10 months ago IIRC, you can communicate entire JSON objects between an iframe and it's host frame with PostMessage.The host can then act as a server for the iframe client, even updating it's state or DOM in response to a message from the iframe.
lelandfe|10 months ago Making iframes be the right size is super awkward. I might actually use them more if they were easy to get responsive.This post does link to a technique (new to me) to extract iframe contents: <iframe src="/example.html" onload="this.before((this.contentDocument.body||this.contentDocument).children[0]);this.remove()"></iframe> dleeftink|10 months ago I've come across this technique here [0] to try it on <object> elements, but sizing is even more difficult there.[0]: https://www.filamentgroup.com/lab/html-includes/ cratermoon|10 months ago Are we solving the information-centric transclusion problem, or the design-centric asset reuse problem? An iframe is fine for the former but is not geared towards design and layout solutions. load replies (1)
dleeftink|10 months ago I've come across this technique here [0] to try it on <object> elements, but sizing is even more difficult there.[0]: https://www.filamentgroup.com/lab/html-includes/
cratermoon|10 months ago Are we solving the information-centric transclusion problem, or the design-centric asset reuse problem? An iframe is fine for the former but is not geared towards design and layout solutions. load replies (1)
rendaw|10 months ago Interaction between elements in different iframes is very restricted. danans|10 months ago IIRC, you can communicate entire JSON objects between an iframe and it's host frame with PostMessage.The host can then act as a server for the iframe client, even updating it's state or DOM in response to a message from the iframe.
danans|10 months ago IIRC, you can communicate entire JSON objects between an iframe and it's host frame with PostMessage.The host can then act as a server for the iframe client, even updating it's state or DOM in response to a message from the iframe.
lelandfe|10 months ago
This post does link to a technique (new to me) to extract iframe contents:
dleeftink|10 months ago
[0]: https://www.filamentgroup.com/lab/html-includes/
cratermoon|10 months ago
webstrand|10 months ago
rendaw|10 months ago
danans|10 months ago
The host can then act as a server for the iframe client, even updating it's state or DOM in response to a message from the iframe.