Animation: timeline プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since March 2020.

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

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

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

js
animation.timeline = document.timeline;

仕様書

Specification
Web Animations
# dom-animation-timeline

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
timeline

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
See implementation notes.

関連情報