runspired / ember-run-raf

Use requestAnimationFrame with Backburner
MIT License
26 stars 15 forks source link

Avoid calling setTimeout without context #3

Closed ismyrnow closed 8 years ago

ismyrnow commented 8 years ago

Currently, this module breaks setTimeout calls in browsers that don't have requestAnimationFrame.

For browsers without requestAnimationFrame, the replacement, which calls setTimeout, wasn't calling it with a function context, resulting in Uncaught TypeError: Illegal invocation in Chrome.

ismyrnow commented 8 years ago

This could solve issue #2, particularly when running integration tests, which uses PhantomJS (which in version 1.9, doesn't have requestAnimationFrame).

runspired commented 8 years ago

Thanks!

runspired commented 8 years ago

@ismyrnow also, I probably didn't notice because I now use the babel-polyfill for all phantom 1.9 stuff, would recommend :P