JSFiddle - React, Tailwind, and code Playground
by MegaScience
CSS
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
JavaScript
var runApp = {
handleEvent: function() {
console.log("Test2");
this.run();
},
init: function() {
document.body.addEventListener("click", this, false);
document.addEventListener("DOMContentLoaded", this, false);
console.log("Test3");
},
run: function() {
console.log("Test3");
alert("It's running! " + this.testPhrase);
},
testPhrase: "Tester"
};
document.addEventListener("load", function () {alert(runApp.testPhrase);}, false);
runApp.init();