Re: [csswg-drafts] [web-animations] how to make animate() method work with CSSKeyframesRule object? (#10570)

Not really possible, you won't get the animations from that element if they're not already applied, and the request here is for a way to apply an effect on an element that has no animations applied to it. 

I don't think there's any way now to refer to a keyframes rule by it's name from Web Animations, and I think it would be nice to be able to do so. E.g. be able to play effects ad-hoc from a library that's already prerenderred to the document's style.

I can think of two APIs that could help here:
1. Referencing a keyframe object by name where a keyframe object param is accepted. 
2. A way to get a map of enumerated keyframe objects by their name. 

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


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

Received on Saturday, 13 July 2024 22:11:08 UTC