Animation extension type

The Animation interface of the Web Animations API represents a single animation player and provides playback controls and a timeline for an animation node or source.

on
Implemented types
Implementers

Constructors

Animation([AnimationEffect? effect, AnimationTimeline? timeline])
factory

Properties

currentTime CSSNumberish?
getter/setter pair
effect AnimationEffect?
getter/setter pair
finished JSPromise<Animation>
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
getter/setter pair
oncancel EventHandler?
getter/setter pair
onfinish EventHandler?
getter/setter pair
onremove EventHandler?
getter/setter pair
pending bool
no setter
playbackRate num
getter/setter pair
playState AnimationPlayState
no setter
ready JSPromise<Animation>
no setter
replaceState AnimationReplaceState
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
startTime CSSNumberish?
getter/setter pair
timeline AnimationTimeline?
getter/setter pair

Methods

addEventListener(String type, EventListener? callback, [JSAny options]) → void
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
inherited
cancel() → void
The Web Animations API's cancel() method of the Animation interface clears all KeyframeEffects caused by this animation and aborts its playback.
commitStyles() → void
The commitStyles() method of the Web Animations API's Animation interface writes the computed values of the animation's current styles into its target element's style attribute. commitStyles() works even if the animation has been automatically removed.
dispatchEvent(Event event) bool
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
inherited
finish() → void
The finish() method of the Web Animations API's Animation Interface sets the current playback time to the end of the animation corresponding to the current playback direction.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pause() → void
The pause() method of the Web Animations API's Animation interface suspends playback of the animation.
persist() → void
The persist() method of the Web Animations API's Animation interface explicitly persists an animation, preventing it from being automatically removed when it is replaced by another animation.
play() → void
The play() method of the Web Animations API's Animation Interface starts or resumes playing of an animation. If the animation is finished, calling play() restarts the animation, playing it from the beginning.
removeEventListener(String type, EventListener? callback, [JSAny options]) → void
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
inherited
reverse() → void
The Animation.reverse() method of the Animation Interface reverses the playback direction, meaning the animation ends at its beginning. If called on an unplayed animation, the whole animation is played backwards. If called on a paused animation, the animation will continue in reverse.
toString() String
A string representation of this object.
inherited
updatePlaybackRate(num playbackRate) → void
The updatePlaybackRate() method of the Web Animations API's Animation Interface sets the speed of an animation after first synchronizing its playback position.

Operators

operator ==(Object other) bool
The equality operator.
inherited