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

We have an experimental implementation of the behavior described in the [proposal](https://github.com/explainers-by-googlers/scroll-triggered-animations/blob/main/PROPOSAL.md) currently in [Chrome Canary](https://www.google.com/intl/en_ca/chrome/canary/). It can be enabled by navigating to "chrome://flags/#enable-experimental-web-platform-features" and switching the setting to "Enabled". I've uploaded a [demo](https://davmila.github.io/sta-demos/explore/index.html) with an example where you can interact with the animation by scrolling as well as by clicking buttons that invoke the playback APIs.

It's still not clear to me how we should answer issue [11914](https://github.com/w3c/csswg-drafts/issues/11914) but I think with the agreement we have, we can put this issue on the agenda and get a resolution on the initial question in [my first comment above](https://github.com/w3c/csswg-drafts/issues/12119#issue-3020104626):

Should animation triggers function by invoking existing playback methods (`play()`, `pause()`, `reverse()`) or by being armed/disarmed by these methods? Our current agreement is for the former behavior (invoking playback methods.)

We could also resolve on adding the AnimationTrigger methods described in the proposal: `AnimationTrigger.addAnimation(Animation)` and `AnimationTrigger.removeAnimation(Animation)`.

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


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

Received on Monday, 9 June 2025 11:41:33 UTC