chrisdickinson / raf

requestAnimationFrame polyfill library
MIT License
742 stars 54 forks source link

Add raf.polyfillObject #35

Closed SimenB closed 7 years ago

SimenB commented 7 years ago

This makes it easier to add the polyfills from outside of the context.

EDIT: This is probably too naive as the implementation does some checks against root which I'd want to be different in my case. Can split it into two files so that I can inject my own global I suppose. WDYT?

SimenB commented 7 years ago

It seems like it'd be simpler to make the polyfill function take an optional object instead?

I had that at first, but didn't want to overload the method. Can do that instead though if maintainers don't mind 🙂

SimenB commented 7 years ago

Changed it to be just the polyfill method.

chrisdickinson commented 7 years ago

Awesome, thanks for the contribution!

chrisdickinson commented 7 years ago

Published as v3.4.0.