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.currentTimetimeline, is inactive or hasn't been played yet, its value is null.Animation.effectAnimationEffectReadOnly associated with this animation. This will usually be a KeyframeEffect object.Animation.finished Read only
Animation.idString used to identify the animation.Animation.pending Read only
Animation.playState Read only
Animation.playbackRateAnimation.ready Read only
Animation.startTimeAnimation.timelinetimeline associated with this animation.Animation.oncancelcancel event.Animation.onfinishfinish event.Animation.cancel()keyframeEffects caused by this animation and aborts its playback.Animation.finish()Animation.pause()Animation.play()Animation.reverse()Animation.updatePlaybackRate()Blinking and flashing animation can be problematic for people with cognitive concerns such as Attention Deficit Hyperactivity Disorder (ADHD). Additionally, certain kinds of motion can be a trigger for Vestibular disorders, epilepsy, and migraine and Scotopic sensitivity.
Consider providing a mechanism for pausing or disabling animation, as well as using the Reduced Motion Media Query to create a complimentary experience for users who have expressed a preference for no animated experiences.
| Specification | Status | Comment |
|---|---|---|
| Web Animations The definition of 'Animation' in that specification. | Working Draft | Initial definition |
| Desktop | ||||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
| Basic support | 44
|
? | 48 | No | 26 | No |
Animation() constructor
|
61 | ? | 48
|
No | ? | No |
cancel
|
39 | ? | 48
|
No | 26 | No |
currentTime
|
39 | ? | 48
|
No | 26 | No |
effect
|
No | ? | 63
|
No | No | No |
finish
|
39 | ? | 48
|
No | 26 | No |
finished
|
No | ? | 63
|
No | No | No |
id
|
50 | ? | 48
|
No | 37 | No |
oncancel
|
50 | ? | 48
|
No | 37 | No |
onfinish
|
39 | ? | 48
|
No | 26 | No |
pause
|
39 | ? | 48
|
No | 26 | No |
pending
|
No | ? | 59
|
No | No | No |
play
|
39 | ? | 48
|
No | 26 | No |
playbackRate
|
39 | ? | 48
|
No | 26 | No |
playState
|
39
|
? | 48
|
No | 26
|
No |
ready
|
No | ? | 63
|
No | No | No |
reverse
|
39 | ? | 48
|
No | 26 | No |
startTime
|
39 | ? | 48
|
No | 26 | No |
timeline
|
No | ? | 63
|
No | No | No |
updatePlaybackRate
|
No | No | 60 | No | No | No |
| Mobile | |||||||
|---|---|---|---|---|---|---|---|
| Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
| Basic support | 44
|
44
|
? | 48 | 26 | No | 4.0 |
Animation() constructor
|
61 | 61 | ? | 48
|
? | No | No |
cancel
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
currentTime
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
effect
|
No | No | ? | 63
|
No | No | No |
finish
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
finished
|
No | No | ? | 63
|
No | No | No |
id
|
50 | 50 | ? | 48
|
37 | No | 5.0 |
oncancel
|
50 | 50 | ? | 48
|
37 | No | 5.0 |
onfinish
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
pause
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
pending
|
No | No | ? | 59
|
No | No | No |
play
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
playbackRate
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
playState
|
39
|
39
|
? | 48
|
26
|
No | 4.0 |
ready
|
No | No | ? | 63
|
No | No | No |
reverse
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
startTime
|
39 | 39 | ? | 48
|
26 | No | 4.0 |
timeline
|
No | No | ? | 63
|
No | No | No |
updatePlaybackRate
|
No | No | No | 60 | No | No | No |
© 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