AnimationPlaybackEvent: AnimationPlaybackEvent() constructor

Baseline 2022

Newly available

Since September 2022, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

The AnimationPlaybackEvent() constructor of the Web Animations API returns a new AnimationPlaybackEvent object instance.


new AnimationPlaybackEvent(type)
new AnimationPlaybackEvent(type, options)



A string with the name of the event. It is case-sensitive and browsers set it to cancel, finish, or remove.

options Optional

An object that, in addition of the properties defined in Event(), has the following properties:

detail Optional

An event-dependent value associated with the event. Defaults to null.

Return value


Web Animations
# dom-animationplaybackevent-animationplaybackevent

Browser compatibility

BCD tables only load in the browser

See also