JSFiddle - React, Tailwind, and code Playground

by Enrique Erne

HTML

<script src="https://gist.github.com/raw/308746/1251d5ebee76d698f9fdaa307effd796f4ffbe90/document.write.moo.js"></script>

JavaScript

// USAGE EXAMPLES //


var start = +new Date;
var i = 1000; 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 && !$try(function(){ return el.get('tag') == 'link' })
};

document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>');