JSFiddle - React, Tailwind, and code Playground
by alexandroppolus
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>
CSS
p{
width: 50px;
height: 50px;
background: #000;
}
JavaScript
setTimeout(function(){
elem = document.createElement('p');
document.body.appendChild(elem);
//setTimeout(function() { alert('1'); },0);
//Promise.resolve().then(function() { alert('1'); });
console.log(document.querySelectorAll('p').length);
alert('1');
},500);