ViewTimeline

The ViewTimeline interface of the Web Animations API represents a view progress timeline (see CSS scroll-driven animations for more details).

MDN Reference

Constructors

Link copied to clipboard
constructor(options: ViewTimelineOptions)

Properties

Link copied to clipboard
open external val axis: ScrollAxis

The axis read-only property of the ScrollTimeline interface returns an enumerated value representing the scroll axis that is driving the progress of the timeline.

Link copied to clipboard
open external val currentTime: CSSNumberish?

The currentTime read-only property of the Web Animations API's AnimationTimeline interface returns the timeline's current time in milliseconds, or null if the timeline is inactive.

Link copied to clipboard
open external val duration: CSSNumberish?

The duration read-only property of the Web Animations API's AnimationTimeline interface returns the maximum value for this timeline or null.

Link copied to clipboard
open external val endOffset: CSSNumericValue

The endOffset read-only property of the ViewTimeline interface returns a CSSNumericValue representing the ending (100% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.

Link copied to clipboard
open external val source: Element?

The source read-only property of the ScrollTimeline interface returns a reference to the scrollable element (scroller) whose scroll position is driving the progress of the timeline and therefore the animation.

Link copied to clipboard
open external val startOffset: CSSNumericValue

The startOffset read-only property of the ViewTimeline interface returns a CSSNumericValue representing the starting (0% progress) scroll position of the timeline as an offset from the start of the overflowing section of content in the scroller.

Link copied to clipboard
open external val subject: Element

The subject read-only property of the ViewTimeline interface returns a reference to the subject element whose visibility within its nearest ancestor scrollable element (scroller) is driving the progress of the timeline.