Message from JavaScript discussions

November 2018

— You can override css styles adding more specificity to the render point, i think it will be easier. i dont know.

Message permanent page

— 

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

Message permanent page

— 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.

Message permanent page

— 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.

Message permanent page

— It was iffy to get the iframe to render a full html document from a markup string rather than a src URL.

Message permanent page

— Hmm, then its not a problem

— That’s what I’m dealing with: An AJAX response containing full markup in the response body.