AnimationEvent Class
The event fired by the CSS animations: animationstart, animationiteration, animationend and animationcancel (https://drafts.csswg.org/css-animations-1/#interface-animationevent).
public sealed class AnimationEvent : Event- Inheritance
EventAnimationEvent
Constructors
| Name | Description |
|---|---|
| AnimationEvent(string, AnimationEventInit?) | Creates an event of the given type. |
AnimationEvent(string, AnimationEventInit?)
AnimationEvent.csCreates an event of the given type.
public AnimationEvent(string type, AnimationEventInit? animationEventInitDict = null)Properties
| Name | Description |
|---|---|
| Animation | Gets the animation that generated the event. |
| AnimationName | Gets the name of the animation (the value of animation-name). |
| ElapsedTime | Gets the time the animation has been running, in seconds, excluding the time it was paused. |
| PseudoElement | Gets the pseudo-element the animation runs on (e.g. ::before), or the empty string. |
Animation
AnimationEvent.csGets the animation that generated the event.
public CssAnimation? Animation { get; }Property value
See also
AnimationName
AnimationEvent.csGets the name of the animation (the value of animation-name).
public string AnimationName { get; }Property value
See also
ElapsedTime
AnimationEvent.csGets the time the animation has been running, in seconds, excluding the time it was paused.
public double ElapsedTime { get; }Property value
See also
PseudoElement
AnimationEvent.csGets the pseudo-element the animation runs on (e.g. ::before), or the empty string.
public string PseudoElement { get; }