finished

The Animation.finished read-only property of the Web Animations API returns a Promise which resolves once the animation has finished playing.

MDN Reference