search

goog.async.AnimationDelay<THIS>

Provided By
Extends
All Implemented Interfaces

A delayed callback that pegs to the next animation frame instead of a user configurable timeout. By design, this should have the same interface as goog.async.Delay.

Uses requestAnimationFrame and friends when available, but falls back to a timeout of goog.async.AnimationDelay.TIMEOUT.

For more on requestAnimationFrame and how you can use it to create smoother animations, see:

new AnimationDelay<THIS>( listener, opt_window, opt_handler )

Parameters
listenerfunction(number): undefined

Function to call when the delay completes. Will be passed the timestamp when it's called, in unix ms.

opt_window(Window|null)=

The window object to execute the delay in. Defaults to the global object.

opt_handler(THIS|null)=

The object scope to invoke the function in.

See Also

http://paulirish.com/2011/requestanimationframe-for-smart-animating/

Instance Methods

Instance Properties

Static Properties