WAAPI getAnimations() doesn't return CSS animations in the <object> element
Categories
(Core :: DOM: Animation, defect)
Tracking
()
People
(Reporter: kari.pihkala, Unassigned)
Details
Attachments
(1 file)
1.10 KB,
application/zip
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
I can reproduce by following these steps:
- Unzip waapi-getAnimations.zip
- Open the main.html file in Firefox
- Open the devtools console and read the results
Actual results:
Firefox console says "No animations found" and all printed arrays are empty.
On Firefox, the Web Animations (WAAPI) Document.getAnimations() and Element.getAnimations() methods don't return CSS animations if the document is embedded using the object tag.
Expected results:
The console should show arrays with one CSS animation without the "No animations found" error.
Google Chrome 95 and Safari 15 print arrays with one CSS animation as expected. Also, if object.html is opened directly on Firefox, then the result matches Chrome and Safari. Only if the object.html file is embedded using the <object> tag, the result differs from Chrome and Safari.
Note: It might be that the CSS/WAAPI specifications allow this kind of variation in results, but this seems a bit odd to me. Here's a link to the WAAPI spec: https://www.w3.org/TR/web-animations-1/#dom-animatable-getanimations
Tested on Firefox 93 and Firefox 95.0a1 (2021-10-27, 20211027214117) nightly.
Comment 1•3 years ago
|
||
It looks to me that at the moment the JS calls getAnimations(), the CSS animation in question hasn't yet been generated. If I call getAnimations in a setTimeout callback with 1000ms, it returns the CSS animation.
Description
•