Re: [csswg-drafts] [web-animations-1] should an animation be ready if its associated target's document lacks a browsing context? (#8439)

@graouts How does the `ready` promise get resolved without an active timeline?

The second condition for [resolving the ready promise](https://drafts.csswg.org/web-animations-1/#ready) is:

> - the animation is associated with a [timeline](https://drafts.csswg.org/web-animations-1/#timeline) that is not [inactive](https://drafts.csswg.org/web-animations-1/#inactive-timeline).

If I do:

```js
const anim = new Animation(new KeyframeEffect(document.body, { opacity: [0, 1] }, 1000), null);
anim.play();
requestAnimationFrame(() => {
  console.log(anim.pending);
});
```

The animation (and it's `ready` promise) should still be pending because there's no active timeline to resolve the start time against.

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


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

Received on Friday, 10 February 2023 00:07:04 UTC