Re: requestAnimationFrame

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 UTC