Re: [RequestAnimationFrame] requestAnimationFrame use in documents whose containing elements have no CSS box

On 1/3/12 8:37 PM, Jatinder Mann wrote:
> Seeing that this API has been designed for visual animations, not sure
> if firing the requestAnimationFrame callbacks on a display:none iframe
> makes sense – can you think of a use case where this would be useful?
> For time based animations, not firing the callbacks when the iframe is
> not visible will have no impact on the animation state when the iframe
> and animation become visible. Of course, frame based animations would be
> different – though, it isn’t the recommended pattern for animations.
> Seems like a waste of CPU cycles to fire the callbacks in the
> display:none case. Thoughts?

Frame based animations using requestAnimationFrame are more or less SOL 
already in background tabs or minimized windows or whatnot.  I don't 
think we should be worrying much about them, personally, past strongly 
discouraging them.

-Boris

Received on Wednesday, 4 January 2012 07:00:06 UTC