Re: [csswg-drafts] [web-animations-2][css-animations-2] How do AnimationTriggers attach to animations? (#12397)

> Good point! Though giving a better API for authors comes first here. I have some preference for `.animations.`, but happy to defer this decision to the more experienced folks (:

Hm.. it isn't clear to me what makes `trigger.animations.add` a better API than `trigger.addAnimation`. `trigger.animations.add` has the problem I described above  concerning `Set` being a generic container, `addAnimation` does not, making it simpler. I think we should go with the simpler thing that meets our needs at the moment.

I would also note that this doesn't preclude adding an `AnimationTrigger.animations` API in the future, along with `Animation.triggers` like @flackr has suggested and which I would be in support of.


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


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

Received on Thursday, 7 August 2025 15:02:17 UTC