MDN wants to learn about developers like you:

This is an experimental technology
Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future versions of browsers as the specification changes.

The Animation interface of the Web Animations API represents a single animation player and provides playback controls and a timeline for an animation node or source.


Creates a new Animation object instance.


The current time value of the animation in milliseconds, whether running or paused. If the animation lacks a timeline, is inactive or hasn't been played yet, its value is null.
Gets and sets the AnimationEffectReadOnly associated with this animation. This will usually be a KeyframeEffect object.
Animation.finished Read only
Returns the current finished Promise for this animation.
Gets and sets the String used to identify the animation.
Animation.playState Read only
Returns an enumerated value describing the playback state of an animation.
Gets or sets the playback rate of the animation.
Animation.ready Read only
Returns the current ready Promise for this animation.
Gets or sets the scheduled time when an animation's playback should begin.
Gets or sets the timeline associated with this animation.

Event handlers

Gets and sets the event handler for the cancel event.
Gets and sets the event handler for the finish event.


Clears all keyframeEffects caused by this animation and aborts its playback.
Seeks either end of an animation, depending on whether the animation is playing or reversing.
Suspends playing of an animation.
Starts or resumes playing of an animation, or begins the animation again if it previously finished.
Reverses playback direction, stopping at the start of the animation. If the animation is finished or unplayed, it will play from end to beginning.


Specification Status Comment
Web Animations
The definition of 'Animation' in that specification.
Working Draft Initial definition

Browser compatibility

Feature Chrome Firefox (Gecko) Microsoft Edge Internet Explorer Opera Safari (WebKit)
Basic support 39.0 [1] 48 (48)[2][3] ? No support No support No support
Constructor No support 48 (48)[2][3] ? No support No support No support
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support (Yes) [1] 48.0 (48)[2][3] No support No support No support
Constructor No support 48.0 (48)[2][3] No support No support No support

[1] Before Chrome 44, implemented as AnimationPlayer (interface name in an early version of the spec).

[2] The Web Animations API is only enabled by default in Firefox Developer Edition and Nightly builds. You can enable it in beta and release builds by setting the preference dom.animations-api.core.enabled to true, and can disable it in any Firefox version by setting this preference to false.

[3] Prior to Firefox 51, the Animation.effect property was read-only.


Document Tags and Contributors

 Last updated by: Machars,