← Back to release summary

Animation.overallProgress

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 133)
Intent stage
None

WPT details: https://wpt.fyi/results/web-animations/interfaces/Animation/overallProgress.tentative.html https://wpt.fyi/results/web-animations/interfaces/Animation/scroll-timeline-overallProgress.tentative.html

Summary

Adds an "overallProgress" property to the JavaScript class Animation[1]. This property provides authors with a convenient and consistent representation of how far along an animation has advanced across its iterations and regardless of the nature of its timeline[2]. [1] https://developer.mozilla.org/en-US/docs/Web/API/Animation [2] https://developer.mozilla.org/en-US/docs/Web/API/AnimationTimeline

Motivation

This property is provide authors a convenient and consistent representation of how far along an animation has advanced across its iterations and regardless of the nature of its timeline. Without animation.overallProgress, a developer would need to manually compute how far an animation has advanced factoring in the number of iterations of the animation and whether the currentTime of the animation is a percentage of total time (as in the case of scroll-driven animations) or an absolute time quantity (as in the case of time-driven animations).

Standards & signals

Ecosystem

Samples: https://davmila.github.io/demo-animation.progress/tda/index.html https://davmila.github.io/demo-animation.progress/sda/index.html

Explainers: https://github.com/DavMila/explainer-animation.progress

View on chromestatus.com