- From: Robert Flack via GitHub <sysbot+gh@w3.org>
- Date: Fri, 10 Mar 2023 16:06:42 +0000
- To: public-css-archive@w3.org
> That suggests an `end` event, separate to the `finish` event, would be needed if we want Web Animations to have an event matching CSS animations/transitions behavior. > > Just to check though, why do we need an end event for Web Animations? When using a non-monotonically increasing timeline you can go from active to the before phase even when `playbackRate > 0`. This is not considered finished, so that event is not fired. The css-animations `end` event *is* fired because it only looks at the change in phase. So we need an end event so that developers can observe this change. This is exemplified in my linked demo when you enable scroll linked animations. > We've so far avoided adding start/end events to Web Animations because they're tied to animation _effects_ and in a world with group effects, it begs the question of, "Do we dispatch these events for _all_ effects in the effect tree or just the root one?". > > If it's the former, perhaps they should be _effect_ events, whose event target is an animation _effect_? And what should be dispatched when a parent effect causes a child effect to repeat etc.? > > If it's the latter, do we need to introduce "start" and "end" concepts to animations, increasing coupling between animations and their root effect's delay properties? I suppose we could add these events to the effect instead. Then the developer can directly observe each effect. Alternately, the event itself could include the effect. Repeated effects would just follow the same logic as the css-animations-2 dispatch table, right? Any issues with this? Wouldn't we have to do this for group effects constructed via css too? -- GitHub Notification of comment by flackr Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8544#issuecomment-1464030034 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 10 March 2023 16:06:44 UTC