This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
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.pending
Read only
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 [1] | 48 (48) | ? | No support | 26 | No support |
Constructor | 61 | 48 (48) | ? | No support | 48 | No support |
Feature | Android Webview | Chrome for Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | 39 [1] | 39 [1] | 48.0 (48)[2][3] | No support | 26 | No support |
Constructor | 61 | 61 | 48.0 (48)[2][3] | No support | 48 | No support |
[1] Before Chrome 44, implemented as AnimationPlayer
(interface name in an early version of the spec).
© 2005–2018 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