You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2017/03/05 09:14:46 UTC

[FlexJS] requestAnimationFrame

For some reason window.requestAnimationFrame and window.cancelAnimationFrame is not recognized. Is that missing from the externs for some reason?

Thanks,
Harbs

Re: [FlexJS] requestAnimationFrame

Posted by Josh Tynjala <jo...@gmail.com>.
It looks like requestAnimationFrame() is defined globally, but not on the
window object, in w3c_anim_timing.js.

You should be able to define Window.prototype.requestAnimationFrame in
missing.js. That should make it available on the window object.

Any time you need to add something to missing.js, it's a good idea to open
a pull request for Google's externs. Window.prototype.requestAnimationFrame
should probably be defined here too:

https://github.com/google/closure-compiler/blob/master/externs/browser/w3c_anim_timing.js

- Josh

On Sun, Mar 5, 2017 at 1:14 AM, Harbs <ha...@gmail.com> wrote:

> For some reason window.requestAnimationFrame and
> window.cancelAnimationFrame is not recognized. Is that missing from the
> externs for some reason?
>
> Thanks,
> Harbs