W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

Re: requestAnimationFrame

From: Robert O'Callahan <robert@ocallahan.org>
Date: Tue, 16 Nov 2010 13:07:10 +1300
Message-ID: <AANLkTin6Wx4D5qx_TiB4QVTcgxBiomXzjgu_x3mhB7Z1@mail.gmail.com>
To: "Gregg Tavares (wrk)" <gman@google.com>
Cc: Boris Zbarsky <bzbarsky@mit.edu>, "public-webapps@w3.org" <public-webapps@w3.org>
On Tue, Nov 16, 2010 at 12:55 PM, Gregg Tavares (wrk) <gman@google.com>wrote:

> I've seen proposals for something more like
>
>       element.setInternvalIfVisible(func, internval);
>
> Which is the same as setInterval but only gets called if the element is
> visible.  With that kind of API there is no connection to rendering. Each
> area that needs animation can set the framerate it is hoping to get. The UA
> can throttle if it wants to.
>

What happens if one element's event handler makes another element visible,
will the second element's timer be able to fire or not?

When an element becomes visible, does its timer fire immediately if the last
firing was more than 'interval' ago?

If the author just wants a smooth animation, what should they pass as the
interval? For smooth animations, it seems to me that the browser alone
should choose the frame rate.

Rob
-- 
"Now the Bereans were of more noble character than the Thessalonians, for
they received the message with great eagerness and examined the Scriptures
every day to see if what Paul said was true." [Acts 17:11]
Received on Tuesday, 16 November 2010 00:07:38 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:42 GMT