web-animations / web-animations-js

JavaScript implementation of the Web Animations API
http://web-animations.github.io
Apache License 2.0
3.77k stars 408 forks source link

BUGFIX: fix window.requestAnimationFrame undefined on low version android OS #163

Closed AntiMoron closed 7 years ago

AntiMoron commented 7 years ago

as post title.

ewilligers commented 7 years ago

Before loading the polyfill, you can use window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame;

AntiMoron commented 7 years ago

@ewilligers I think that's exactly what a polyfill should do...

AntiMoron commented 7 years ago

How about window.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || function(f) {setTimeout(f, 16);} to make sure there's an implementation of requestAnimationFrame?