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.timeline
は Animation
インターフェイスのプロパティで、このアニメーションに関連付けられた 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
関連情報
- ウェブアニメーション API
Animation
AnimationTimeline
(en-US): すべてのタイムラインが継承する親オブジェクトDocumentTimeline
(en-US): 現在利用できる唯一のタイムラインオブジェクトDocument.timeline
: すべてのアニメーションに割り当てる既定値