This file contains hidden or 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
/** | |
Workaround for iOS 6 setTimeout bug using requestAnimationFrame to simulate timers during Touch/Gesture-based events | |
Author: Jack Pattishall ([email protected]) | |
This code is free to use anywhere (MIT, etc.) | |
Usage: Pass TRUE as the final argument for setTimeout or setInterval. | |
Ex: | |
setTimeout(func, 1000) // uses native code | |
setTimeout(func, 1000, true) // uses workaround |