JSFiddle - React, Tailwind, and code Playground

by Paulpro

HTML

<div id="test">CLICK</div>

JavaScript

document.onclick = function(e){
    e = e || window.event;
    if(e.target.id == 'test')
        alert('OK');
}