Which means that this could be on case where you might indeed use document.write.
In this case, you could do the writes into an <iframe>.
Not ideal, but workable.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.