The Web Animations API allows for synchronizing and timing changes to the presentation of a Web page, i.e. animation of DOM elements. It does so by combining two models: the Timing Model and the Animation Model.
The Web Animations API provides a common language for browsers and
developers to describe animations on DOM elements. To get more
information on the concepts behind the API and how to use it, read Using the Web Animations API.
Provides playback controls and a timeline for an animation node or source. Can take an object created with the
constructor.KeyframeEffect()
Describes sets of animatable properties and values, called keyframes and their timing options. These can then be played using the
constructor.Animation()
Represents the timeline of animation. This interface exists to define timeline features (inherited by
and future timeline objects) and is not itself accessed by developers.DocumentTimeline
Actually part of CSS Animations.
Represents animation timelines, including the default document timeline (accessed using the
property).Document.timeline
Element.animate()
,KeyframeEffectReadOnly.KeyframeEffectReadOnly()
, KeyframeEffect.KeyframeEffect(
)
all accept an optional dictionary object of timing properties.
The Web Animations API adds some new features to
and document
.element
Extensions to the
Document
interfaceThe
DocumentTimeline
object representing the default document timeline.Returns an Array of
objects currently in effect on elements in the Animation
document
.Extensions to the
Element
interfaceElement.animate()
A shortcut method for creating and playing an animation on an element. It returns the created
object instance.Animation
Returns an Array of
objects currently affecting an element or which are scheduled to do so in future.Animation