Message from JavaScript discussions
November 2018
— I’m just trying to explore whether I can still use it for my case.
You can override css styles adding more specificity to the render point, i think it will be easier. i dont know.
— That would require ne to actually touch and alter any CSS that I get. I’d like to avoid that as well. The ideal would be a completely independent document. I’m very far from that ideal as currently, we isolate styles by prefixing all selectors etc. That way, no styles leak out to the parent document, but styles from the parent document can still leak in.
— Its not possible without re-parsing, i believe. the shortest way to adapt css, i see, is to wrap all rules in #id {...} of each css file of that doc, compile it on server side and then inject into document.styleSheets
— So.. as you do
— This project is very much a prototype in development. A top-level goal is to keep all implementation as decoupled from the document I want to embed as possible. If that’s not feasable, steps like processing CSS would be necessary, but I try to avoids that.
— Why not iframe?
— I tried that, but it was extremely iffy.
— Wat is iffy?
— I should probably also note that the document I’m trying to embed comes from the same origin. I’m not trying to embed random interweb pages.
— It was iffy to get the iframe to render a full html document from a markup string rather than a src URL.
— Hmm, then its not a problem