For which browsers are we using Paul Irish's requestAnimationFrame shim?

我们两清 提交于 2019-12-04 00:25:45

I'm afraid the polyfill/shim will be necessary if you want to support older browsers.

As you point out, it works with latest Firefox and Chrome without prefix. Firefox has also a new policy not to prefix any future technology so that's perhaps a good thing too and there is a proposal to do the same for Chrome.

But if you run older browsers (and a surprisingly large group of users do) the polyfill is necessary.

Source

Here we see IE9 on top followed by IE8, 10 and then older Chrome versions (although this includes the whole last year which explains the Chrome part and also IE9 vs. IE10). Variations may apply to regions so test out the geographic area where you think your application is relevant.

You need the polyfill for IE8, IE9, Android Browser, and a bunch of older stuff you'd have to make a judgement call on.

Here's the current support for rAF thanks to caniuse.com:

Anything with a yellow flag in the corner uses a prefix so it needs the shim. Anything red needs the setTimeout fallback.

But, to get at your core point... soon, yes, soon, the polyfill will be much smaller. And hopefully not too long from now we can kill it and use rAF directly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!