Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
[Put in omnibar] Simple script which which updates a number in a <p> on each requestAnimationFrame call -
data:text/html,<!doctype html><p class="test">0</p><script>var test = document.querySelector('.test'); var count = 0; requestAnimationFrame(function increment() { console.log('test'); test.textContent = ++count; requestAnimationFrame(increment); }); increment();</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.