// USAGE EXAMPLES // var start = +new Date; var i = 100; while (i--){ document.write(i + ' '); } var end = +new Date; alert(end - start); window.addEvent('domready', function(){ document.write('Lorem ipsum dolor sit amet'); var myDiv = new Element('div'); document.write.context = myDiv; document.write('Lorem ipsum dolor sit amet'); myDiv.inject(document.body, 'top'); }); document.write(1, 2, 3, 4); // handles multiple arguments document.write(); // doesn't break document.write(null); // Add a filter to stop certain things from being injected into your page document.write.filter = function(el){ return el && !Function.attempt(function(){ return el.get('tag') == 'link'; }); }; document.write('');