Re: [csswg-drafts] [scroll-animations] Should setting `iterations` to `Infinity` via a call to `updatingTiming()` throw? (#11343)

> Constructing effects with `Infinity` works everywhere. Seems wrong to be failing on update.

We have many cases in the web animations spec where trying to do something nonsensical throws (e.g. negative iterations, negative duration, passing unsorted keyframes to setKeyframes, trying to play an infinite duration or iteration animation in reverse).

In this test case, having infinite iterations results in a total time of infinity when [converting to a proportional animation](https://drafts.csswg.org/web-animations-2/#time-based-animation-to-a-proportional-animation), meaning that naively start delay, iteration duration and end delay would all be 0 I suppose. This can't match the expected result of the animation filling the specified range, so it seems like throwing an error might be reasonable in the same way you can't start a reverse direction infinite iteration animation.

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


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

Received on Tuesday, 10 December 2024 17:03:42 UTC