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|
1. 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.