JSFiddle - React, Tailwind, and code Playground
by dogmeethorse
HTML
<div id="d1"> </div>
<button id="b1">button</button>
JavaScript
d1 = document.getElementById("d1");
b1 = document.getElementById("b1");
var done = new Event('done');
d1.addEventListener('done', function(){d1.innerHTML = Math.random()});
b1.addEventListener("click",
function(){
b1.innerHTML = Math.random();
d1.dispatchEvent(done);
})