W3C home > Mailing lists > Public > public-css-archive@w3.org > January 2018

Re: [csswg-drafts] [web-animations-1] Should async playback methods return the `ready` Promise?

From: Brian Birtles via GitHub <sysbot+gh@w3.org>
Date: Mon, 22 Jan 2018 00:14:38 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-359295031-1516580077-sysbot+gh@w3.org>
Yes, after I left the office on Friday I was thinking about this some more and came to the same conclusion that we should return the finished promise from `play()` and `reverse()`.

There aren't really any strong use cases for the `ready` promise. Like you said, it's mostly useful for synchronization. For example, if you start an animation you don't know the actual `startTime` until it finishes painting. So if you want to synchronize something with a newly-started animation you'd need to wait on `ready`.

I think my thinking was biased by the fact that I am writing so many web-platform-tests for this where we wait on `ready` to check values like `startTime` ― not a very typical use case!

GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2206#issuecomment-359295031 using your GitHub account
Received on Monday, 22 January 2018 00:14:46 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:23 UTC