Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
cancel all request animation frames
window.cancelRequestAnimFrame = ( function() {
return window.cancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
window.oCancelRequestAnimationFrame ||
window.msCancelRequestAnimationFrame ||
clearTimeout
} )();
for (var i = 1; i < 99999; i++) {
window.clearInterval(i);
window.cancelRequestAnimFrame(i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.