Created
November 27, 2012 10:09
-
-
Save Takazudo/4153444 to your computer and use it in GitHub Desktop.
requestAnimationFrame polyfill
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
window.requestAnimFrame = do -> | |
window.requestAnimationFrame or | |
window.webkitRequestAnimationFrame or | |
window.mozRequestAnimationFrame or | |
window.oRequestAnimationFrame or | |
window.msRequestAnimationFrame or | |
(callback, element) -> | |
window.setTimeout callback, 1000 / 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment