This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The Animation.timeline property of the Animation interface returns or sets the timeline associated with this animation. A timeline is a source of time values for synchronization purposes, and is an AnimationTimeline-based object. By default, the animation's timeline and the Document's timeline are the same.


var animationsTimeline = Animation.timeline;

Animation.timeline = newTimeline;


timeline object to use as the timing source for the animation, or null to use the default, which is the Document's timeline.


Here we set the animation's timeline to be the same as the document's timeline (this is the default timeline for all animations, by the way):

animation.timeline = document.timeline;


Specification Status Comment
Web Animations
The definition of 'Animation.timeline' in that specification.
Working Draft Editor's draft.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support No ?481 2 No No No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support No No ?481 2 No No No

1. This property is supported in Firefox 48 but is read-only. It became writable in Firefox 49.

2. From version 48: this feature is behind the dom.animations-api.core.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

See also

Document Tags and Contributors

Contributors to this page: fscholz, Sheppy, birtles, chrisdavidmills, rachelnabors
Last updated by: fscholz,