JSFiddle - React, Tailwind, and code Playground

by darcyclarke

JavaScript

var iframe = document.createElement('iframe');
iframe.style.display = "none";
iframe = document.body.appendChild(iframe);
var cleanDOM = iframe.contentWindow;
document.body.removeChild(iframe);

/////////////////////////////////////////
// Use Cases 
/////////////////////////////////////////

// Bad Practice, but it happens
window.Array = function(args){
 return false; // ew   
};

// Maybe this works still tho?
var someArray = new Array(3,4,55,6);
console.log(someArray); // OH NOES!!!!!

// Let's try our cleanDOM Object
someArray = new cleanDOM.Array(2,4,55,6);
console.log(someArray); // YAY!!!!!