Created
February 16, 2017 15:58
-
-
Save jasonwilliams/41364a7734eee0ff3b231c530725bc08 to your computer and use it in GitHub Desktop.
[Put in omnibar] Simple script which which updates a number in a <p> on each requestAnimationFrame call - http://codepen.io/jayflux/pen/xgeLjW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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