JSFiddle - React, Tailwind, and code Playground

by nwellcome

JavaScript

function initInterface() {
    var mainPane = document.createElement('div');
    mainPane.style.border="5px solid grey";
    mainPane.style.margin="0px";
    mainPane.style.width="420px";
    mainPane.style.height="600px";

    var exitButton = document.createElement('input');
    exitButton.setAttribute("type", "button");
    exitButton.setAttribute("value", "exit");
    exitButton.onclick = function () {
        return (function() {
             document.body.removeChild(mainPane);
        })(mainPane);
    };
    
    mainPane.appendChild(exitButton);

    document.body.appendChild(mainPane);
}
    
initInterface();