AnimationPlaybackEvent: AnimationPlaybackEvent() constructor
The AnimationPlaybackEvent()
constructor of the Web Animations API returns a new AnimationPlaybackEvent
object instance.
Syntax
js
new AnimationPlaybackEvent(type)
new AnimationPlaybackEvent(type, options)
Parameters
type
-
A string with the name of the event. It is case-sensitive and browsers set it to
cancel
,finish
, orremove
. 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
A new AnimationPlaybackEvent
object.
Specifications
Specification |
---|
Web Animations # dom-animationplaybackevent-animationplaybackevent |
Browser compatibility
BCD tables only load in the browser