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
// requestAnimationFrame implementation as a custom function to allow blacklisting | |
// devices with broken implementation. Currently needs timer-based fallbacks for iOS 6.x for | |
// code running inside <iframe> elements. | |
// Uses polyfills based on http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
(function() { | |
var blacklisted = /iP(ad|hone|od).*OS 6/.test(window.navigator.userAgent), | |
lastTime = 0, | |
nativeRequest = window.requestAnimationFrame || null, | |
nativeCancel = window.cancelAnimationFrame || null; |