ScrollTimeline

open class ScrollTimeline(options: ScrollTimelineOptions = definedExternally) : AnimationTimeline(source)

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

MDN Reference

Inheritors

Constructors

Link copied to clipboard
constructor(options: ScrollTimelineOptions = definedExternally)

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