Skip to content

Instantly share code, notes, and snippets.

@jasonwilliams
Created February 16, 2017 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasonwilliams/41364a7734eee0ff3b231c530725bc08 to your computer and use it in GitHub Desktop.
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
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