JSFiddle - React, Tailwind, and code Playground
HTML
<button type="button" id="gogogo">Go!</button>
<div id="progress">0</div>
JavaScript
//window.onload=function(){
var W=window,D=W.document,a=0,c=D.getElementById('progress');
function b(){
c.textContent=a+1;a++;
if(a<500){
requestAnimationFrame(b);
}else{
D.body.style.cursor='default';
}
}
function start(){
console.log(D)
D.body.style.cursor='wait';
b()
}
D.getElementById('gogogo').onclick=start;
//}