Re: [csswg-drafts] [scroll-animations-1] Animation.getCurrentTime is easily confused with Animation.currentTime (#8201)

After playing with the API a bit, I follow what Brian is saying and think `getCurrentTimeForRange` makes most sense, as that’s what the function essentially does. Other names didn’t cover what the function does.

An alternative name that came up was `getProgressForRange` but I see how reusing `CurrentTime` in the name makes sense because `currentTime` also returns a progress for non-time-based timelines.

Also fine with the property bag approach. To be clear, that would then, for example, be `getCurrentTime({ range: `cover` })`?

-- 
GitHub Notification of comment by bramus
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8201#issuecomment-1493397265 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Sunday, 2 April 2023 17:28:19 UTC