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

We should also consider having a trigger setter/getter on animation, e.g.
```js
animation.trigger = new TimelineTrigger(...);
```

Or when we support multiple triggers,
```js
animation.trigger = [trigger1, trigger2, ...];
```

The only surprising thing is that setting the trigger will also trigger (no pun intended) a stateful change from idle -> paused, to put the animation in the state where it is active and ready to start playing when the trigger condition occurs. However, setting trigger on animation does seem simple.

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


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

Received on Monday, 28 July 2025 15:39:31 UTC