ready property
The read-only Animation.ready property of the
Web Animations API
returns a Promise which resolves when the animation is ready to play. A
new promise is created every time the animation enters the "pending"
play state
as well as when the animation is canceled, since in both of those
scenarios, the animation is ready to be started again.
Note: Since the same
Promiseis used for both pendingplayand pendingpauserequests, authors are advised to check the state of the animation when the promise is resolved.
Implementation
external JSPromise<Animation> get ready;