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.
Animation()
Animation
object instance.Animation.currentTime
timeline
, is inactive or hasn't been played yet, its value is null
.Animation.effect
AnimationEffectReadOnly
associated with this animation. This will usually be a KeyframeEffect
object.Animation.finished
Read only
Animation.id
String
used to identify the animation.Animation.playState
Read only
Animation.playbackRate
Animation.ready
Read only
Animation.startTime
Animation.timeline
timeline
associated with this animation.Animation.oncancel
cancel
event.Animation.onfinish
finish
event.Animation.cancel()
keyframeEffects
caused by this animation and aborts its playback.Animation.finish()
Animation.pause()
Animation.play()
Animation.reverse()
Specification | Status | Comment |
---|---|---|
Web Animations The definition of 'Animation' in that specification. | Working Draft | Initial definition |
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.
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/Animation