Skip to content

Instantly share code, notes, and snippets.

@danwalmsley
Last active October 22, 2022 14:41
Show Gist options
  • Save danwalmsley/7bfe8b59bf96a6143322d8641572d14c to your computer and use it in GitHub Desktop.
Save danwalmsley/7bfe8b59bf96a6143322d8641572d14c to your computer and use it in GitHub Desktop.
repro chrome requestAnimationFrame issue
<!DOCTYPE html>
<html>
<body>
<script>
var request = window.requestAnimationFrame(onRender);
var frame = 0;
function onRender (){
console.log("paint");
document.body.textContent = ++frame;
request = window.requestAnimationFrame(onRender);
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment