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;
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;
The definition of 'Animation.timeline' in that specification.
|Working Draft||Editor's draft.|
|Feature||Android webview||Chrome for Android||Edge mobile||Firefox for Android||Opera Android||iOS Safari||Samsung 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.