The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Android trouble with asynchronous script Reply To: Android trouble with asynchronous script


I think I figured out the original issue as well. This only works (at least on this OS) if the feature is actually present :

if (requestAnimationFrame) // do something

And it breaks the script when not. So changing it makes using both ‘doc ready’ and immediately invoked functions possible :

if (window.requestAnimationFrame) // do something

Checking support for prefixed versions is a bit too much for the small base that it would serve these days in my opinion.