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()Creates a new Animation object instance.
Animation.currentTimeThe 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.
Animation.effectGets and sets the AnimationEffect associated with this animation. This will usually be a KeyframeEffect object.
Animation.finished Read onlyReturns the current finished Promise for this animation.
Animation.idGets and sets the String used to identify the animation.
Animation.overallProgress Read onlyReturns a number between 0 and 1 indicating the animation's overall progress towards its finished state.
Animation.pending Read onlyIndicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
Animation.playState Read onlyReturns an enumerated value describing the playback state of an animation.
Animation.playbackRateGets or sets the playback rate of the animation.
Animation.ready Read onlyReturns the current ready Promise for this animation.
Animation.replaceState Read onlyIndicates whether the animation is active, has been automatically removed after being replaced by another animation, or has been explicitly persisted by a call to Animation.persist().
Animation.startTimeGets or sets the scheduled time when an animation's playback should begin.
Animation.timelineGets or sets the timeline associated with this animation.
Animation.cancel()Clears all keyframeEffects caused by this animation and aborts its playback.
Animation.commitStyles()Commits the current styling state of an animation to the element being animated, even after that animation has been removed. It will cause the current styling state to be written to the element being animated, in the form of properties inside a style attribute.
Animation.finish()Seeks either end of an animation, depending on whether the animation is playing or reversing.
Animation.pause()Suspends playing of an animation.
Animation.persist()Explicitly persists an animation, preventing it from being automatically removed when another animation replaces it.
Animation.play()Starts or resumes playing of an animation, or begins the animation again if it previously finished.
Animation.reverse()Reverses playback direction, stopping at the start of the animation. If the animation is finished or unplayed, it will play from end to beginning.
Animation.updatePlaybackRate()Sets the speed of an animation after first synchronizing its playback position.
cancelFires when the Animation.cancel() method is called or when the animation enters the "idle" play state from another state.
finishFires when the animation finishes playing.
removeFires when the animation is automatically removed by the browser.