Skip to content
SiteEmail

Animation

Module: JavaScript DOM API

The Animation object for dom element.

#include <Animation.idl>

Inherited by CSSAnimation

Name
voidplay()
Starts playing the animation if paused, does nothing if already running.
voidpause()
Pauses the animation if running, does nothing if finished/paused.
voidreverse()
Reverses the animations playbackRate and plays it.
voidplayFromTo(double playTime, double pauseTime, optional AnyCallback callback)
Plays an animation from the selected time to the pause time. When the pauseTime is reached, the animation is automatically paused and the callback is invoked.
voidcommitStyles()
voidfinish()
voidcancel()
voidpersist()
Name
attribute doublecurrentTime
The current time of the animation.
attribute doubleplaybackRate
The playback rate of the animation.
attribute EventSetterfinish
void play()

Starts playing the animation if paused, does nothing if already running.

void pause()

Pauses the animation if running, does nothing if finished/paused.

void reverse()

Reverses the animations playbackRate and plays it.

void playFromTo(
double playTime,
double pauseTime,
optional AnyCallback callback
)

Plays an animation from the selected time to the pause time. When the pauseTime is reached, the animation is automatically paused and the callback is invoked.

void commitStyles()
void finish()
void cancel()
void persist()
attribute double currentTime;

The current time of the animation.

attribute double playbackRate;

The playback rate of the animation.

attribute EventSetter finish;