JSFiddle - React, Tailwind, and code Playground
by Darth Vader
HTML
<h1>
Welcome to a temporary page.
</h1>
<div id="closeButton">
Click here to close2
</div>
CSS
#closeButton {
cursor: pointer;
}
JavaScript
$("#closeButton").click(function() {
console.log("Hello!");
console.log("Trying window.close()");
window.close();
window.open(location, '_self').close();
});