-
Notifications
You must be signed in to change notification settings - Fork 707
[css-animations-2][css-transitions-2] Add animation object to animation/transition events. #9010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Very much in favor of this. Surprised me it didn’t already give authors the full details. |
@birtles FYI |
Wow, super needed! I was trying for sometime to think how to do that with the missing |
Sounds great. |
Restating the resolution to make sure I am understanding correctly (thumbs up if this is good, please reply with a correction if I am wrong) Proposed Resolution: Add an |
The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment. Proposed Resolution: Add an animation property to the animation*/transition* events that contains the relevant Animation object |
(Non-substantive clarification to the resolution: the types of the |
RESOLVED: Add an animation property to the animation*/transition* events that contains the relevant Animation object (CSSAnimation and CSSTransition respectively) |
Currently the css-animations-1 AnimationEvent and the css-transitions-1 TransitionEvent only provide details about the animation (its name, and timing) or transition (property and timing), but if you wanted to get the actual Animation object you would have to call getAnimations() on the element and find the corresponding animation. E.g.
If the same animation name is started twice, e.g.
animation: keyframes 1s, keyframes 1s
, the developer doesn't have any way to know which Animation object in the getAnimations list corresponds to the AnimationEvent.I propose we add the web-animations Animation object for the animation / transition to these events so that developers can easily get the associated Animation from the events. I'd propose calling it
animation
in both interfaces though we could consider calling ittransition
in the TransitionEvent interface even though the type would be Animation.The text was updated successfully, but these errors were encountered: