Re: [csswg-drafts] [css-animations-2][web-animations-2] How should AnimationTrigger work? (#12119)

Another use case to consider is developer tools where you have a button that pauses all animations and resumes them (as chrome dev tools has). I would expect that if I do the following:

```js
const paused = document.getAnimations().filter(anim => anim.playState == 'playing');
paused.forEach(anim.pause());
```

This would pause all of the animations in their current state, and then if I later call:

```js
paused.forEach(anim => anim.play());
```

I'd expect it to restore the animations to the state they were in prior to pausing. With play arming the trigger, I think this code just works, however if it's a separate API to arm the triggers then developers will have to carefully handle that in some way.

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


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

Received on Thursday, 8 May 2025 20:13:28 UTC