
let w = window.open();
w.document.open();
w.document.write(sd); // sd is a string that I construct from the settings for each site
w.document.close();
--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/314f12d9-23c7-4fcc-88bb-e32a5d3bdae3n%40googlegroups.com.
I still don't see why you need it. What's in sd that you can't create
using w.document.createElement, appendChild, etc?
--
You received this message because you are subscribed to the Google Groups "friam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to friam+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAKQgqTbsUm4tf3NW27iRGoD1YoN7N_4kpWkhh-5%2BjJj68u%2BK3A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CANpA1Z2SGwMwn9n4YMiGX2T%2B5Jz8We0L28SmOynU6F%3Da2cKnLg%40mail.gmail.com.
Adding all those elements will be a pain. To make matters worse, I only need to do that for Safari. I can make things work just fine with the string in Chrome and Firefox. One approach that might work is to use a template element, but I'd need template.innerHTML, which has many of the same risks.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAKQgqTY1xbyhAkP4MWL_CcuMEPLn%2Bt2Deo0XOcdU9F3AAg59Hg%40mail.gmail.com.
There are existing tools like https://github.com/Damian96/html-to-dom
that take html as input, parse it, and generate dom calls, effectively
giving you the same API as document.write().
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/CAKQgqTY1xbyhAkP4MWL_CcuMEPLn%2Bt2Deo0XOcdU9F3AAg59Hg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/friam/126b2d2f-f067-4836-842a-c06a56210f4dn%40googlegroups.com.