Animation: timeline プロパティ

Baseline 2022

Newly available

Since September 2022, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

Animation.timelineAnimation インターフェイスのプロパティで、このアニメーションに関連付けられた timeline (en-US) を返したり設定したりします。タイムラインは同期を目的とした時刻値の元であり、AnimationTimeline (en-US)ベースのオブジェクトです。既定値では、アニメーションのタイムラインと Document のタイムラインは同じです。

アニメーションのタイミングソースとして使用するタイムラインオブジェクト (en-US)、または既定値では null であり、 Document のタイムラインを使用することを表します。

ここでは、アニメーションのタイムラインを文書のタイムラインと同じに設定します(ちなみに、これはすべてのアニメーションの既定値です):

js
animation.timeline = document.timeline;

仕様書

Specification
Web Animations
# dom-animation-timeline

ブラウザーの互換性

BCD tables only load in the browser

関連情報