Skip to content

Instantly share code, notes, and snippets.

@lean8086
Created May 25, 2012 19:56
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 lean8086/2790204 to your computer and use it in GitHub Desktop.
Save lean8086/2790204 to your computer and use it in GitHub Desktop.
Request Animation Frame polyfill
var fps = 1000 / 60,
rAF = window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.msRequestAnimationFrame ||
window.oRequestAnimationFrame ||
function (callback) {
window.setTimeout(callback, fps);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment