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

Re: requestAnimationFrame

From: Robert O'Callahan <robert@ocallahan.org>
Date: Sat, 20 Nov 2010 18:39:36 +1300
Message-ID: <AANLkTi=ppe2KF5MKrU4_gdYGceB1qkGoZcbWfTsjc5bU@mail.gmail.com>
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: Ojan Vafai <ojan@chromium.org>, "public-webapps@w3.org" <public-webapps@w3.org>
On Sat, Nov 20, 2010 at 2:35 PM, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:

> Obviously
> that does not address your question, since "couldn't" never applies
> here, you could always just use setTimeout and setInterval and burn
> cycles, or whatever else gurantees your script runs even when the tab
> is in the background, and implement the logic as you see fit.
>

"Couldn't" is never an issue here. You can always use setTimeout as a
backstop to ensure that your end-of-animation code runs even if
requestAnimationFrame never fires a callback. My concern is that authors are
likely to forget to do this even if they need to, because testing scenarios
are unlikely to test switching to another tab in the middle of the
animation.

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 Saturday, 20 November 2010 05:40:04 GMT

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