Skip to content

Instantly share code, notes, and snippets.

@nevergiveup-j
Created December 14, 2015 12:11
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 nevergiveup-j/3be68594eba85237941c to your computer and use it in GitHub Desktop.
Save nevergiveup-j/3be68594eba85237941c to your computer and use it in GitHub Desktop.
_requestAnimationFrame
this._requestAnimationFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function(/* function */ callback, /* DOMElement */ element){
window.setTimeout(callback, 1000 / 60);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment