JSFiddle - React, Tailwind, and code Playground
by maxell4o
HTML
<html>
<body>
</body>
</html>
CSS
body, html {
margin: 0;
padding: 0;
}
.point {
width: 20px;
height: 20px;
background: red;
border-radius: 50%;
position: fixed;
top: 0;
left: 0;
}
JavaScript
const w = window.innerWidth;
const h = window.innerHeight;
const point = document.createElement('div')
point.classList.add('point');
document.body.append(point);
const draw = () => {
console.log(w, h)
}
const request = () => {
draw();
// window.requestAnimationFrame(request);
}
request();