💡 LightUp 7.1 | SketchUp's only real-time renderer that uses object-based rendering
Download Trial
Document.write() cover function
-
I originally wrote dw() as a typist-friendly synonym for document.write(). Then I had it write text to an alert() box if "debug" was set true. It got improved to the following when I found that none of my browsers could manage a scrollbar for an over-length alert() box. (Beer license: if this helps you and we happen to meet, first round is on you.)
function dw( text ) { if ( debug ) { // in your old line editor; rep /</</g document.write( text.replace(new RegExp( '<', 'g' ), '<') + '<br>' ); } else { document.write( text ); } }
Advertisement