Skip to content

Instantly share code, notes, and snippets.

Forked from subtleGradient/gist:134113
Created June 22, 2009 19:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
(function(write, wrapper, slice, fragment){
document.write = function(){
var id = 'document_write' + $time().toString(36);
var html ='');, '<span id="' + id + '"></span>');
window.addEvent('domready', function(){
Array.filter(wrapper.set('html', html).childNodes, document.write.filter).each(function(node){
$(id).parentNode.replaceChild(fragment, $(id));
document.write.filter = function(el){
return true;
})(document.write, new Element('div'), Array.prototype.slice, document.createDocumentFragment());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment