JSFiddle - React, Tailwind, and code Playground

by Qwerty_Wasd

HTML

<input type="button" value="Close this window" onclick="windowClose();">

JavaScript

function windowClose() {
window.open('','_parent','');
window.close();
}