- From: Yehonatan Daniv via GitHub <noreply@w3.org>
- Date: Wed, 10 Sep 2025 15:46:02 +0000
- To: public-css-archive@w3.org
@DavMila: > I don't think the trigger user should be specifying the DOM event. It should know whether a specified trigger has fired, but not how it has fired. Only the trigger element itself should be caring about what events are triggering. I don't agree, I think similar to @fantasai's 1st point above, it's a property of the triggering element, and shouldn't be part of the target's API, or even overridable by it. > I think the additional ident hardly poses any additional difficulty with the usability of the API. I understand your point, but I think exposing a redundant ident is not a good choice for the API/syntax. > I also like that option 1 is likely closer to what we'll have to declare for the IDL, i.e `AnimationTrigger.addAnimation(animation, action, behavior)` The `action` should be a property of the trigger itself, not set per added `animation`. Otherwise `AnimationTrigger` is just a generic event emitter, right? Does it make sense to create one without specifying the source of the event? Regarding `timeline-event`, I still think it's not a good API choice for requiring the actions. Moreover, if we use the single `trigger()` function it shouldn't take arbitrary number of arguments based on the type of the trigger. I wonder if there's even a use case for stuff like `trigger(--timeline-trig, enter pause, exit reset)`, does it even make any sense? ------------ @fantasai: > We need to provide more abstract concepts for triggers. Sometimes you want to be very specific about what DOM event is triggering, and exclude all others, but in many cases you want something more generic. For example, the author shouldn't need to think about whether a button was triggered using click, touch, or a keyboard event. They should only be concerned with whether the button was activated somehow. Agree. We should have something that captures higher level events like `activate` etc. It's usually the case and also prevents you from silly things, like omitting keyboard support. -- GitHub Notification of comment by ydaniv Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12652#issuecomment-3275540294 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 10 September 2025 15:46:03 UTC