How to use requestAnimationFrame?
Warning! This question is not about the best way to shim requestAnimFrame. If you are looking for that, move on to any other answer on this page. You got tricked by automatic semicolon insertion. Try this: window.requestAnimFrame = function(){ return ( window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(/* function */ callback){ … Read more