You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an animation is supplied an inactive timeline (e.g. a ScrollTimeline using a scroller with style="display:none") it will fail.
Before setting hold_time in play() we need to first check that there is an active timeline. If not, we should not start the animation until the timeline has become active.
The text was updated successfully, but these errors were encountered:
I'm not quite sure why that's the expected behavior. I would expect the animation to end up with a hold time of zero and wait there until the timeline is ready. That was at least the desired behavior when we were modeling SVG's document timelines (which are not active until the SVG document fragment's onload event fires).
Perhaps more importantly, how would one differentiate between an animation associated with a timeline that is not playing because the timeline is inactive (but will be as soon as the timeline becomes active) and one that is simply attached to an inactive timeline (and will not play when the timeline becomes active)?
My expectation is based on how AnimationWorklet handles the same situation. There is a WPT test [1] for AnimationWorklet that expects animation.currentTime to return null for the initially inactive timeline. If we return 0 as suggested this would create opposing expectations for systems that should mirror each other. Should the AnimationWorklet test be changed?
I think that unless we can find a way to differentiate between the two cases I mentioned (second paragraph in my previous comment), we can't easily change this.
There are a bunch of inter-related issues related to timelines and it may be that we do some more comprehensive reworking of timelines we can change this, however.
https://drafts.csswg.org/web-animations/#playing-an-animation-section
If an animation is supplied an inactive timeline (e.g. a ScrollTimeline using a scroller with style="display:none") it will fail.
Before setting
hold_time
inplay()
we need to first check that there is an active timeline. If not, we should not start the animation until the timeline has become active.The text was updated successfully, but these errors were encountered: