The AnimationPlaybackEvent() constructor of the Web Animations API returns a new AnimationPlaybackEvent object instance.
new AnimationPlaybackEvent(type)
new AnimationPlaybackEvent(type, options)typeA string with the name of the event. It is case-sensitive and browsers set it to cancel, finish, or remove.
options OptionalAn object that, in addition of the properties defined in Event(), has the following properties:
detail OptionalAn event-dependent value associated with the event. Defaults to null.
A new AnimationPlaybackEvent object.