Closed Bug 1738226 Opened 3 years ago Closed 3 years ago

WAAPI getAnimations() doesn't return CSS animations in the <object> element

Categories

(Core :: DOM: Animation, defect)

Firefox 95
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: kari.pihkala, Unassigned)

Details

Attachments

(1 file)

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:

  1. Unzip waapi-getAnimations.zip
  2. Open the main.html file in Firefox
  3. 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.

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.

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: