package js.html
extends EventTarget
extended by CSSAnimation, CSSTransition
Available on js
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.
Documentation Animation by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
new(?effect:AnimationEffect, ?timeline:AnimationTimeline)Throws:
null |
DOMError |
|---|
currentTime:FloatThe current time value of the animation in milliseconds, whether running or paused. If the animation lacks a AnimationTimeline, is inactive or hasn't been played yet, its value is null.
effect:AnimationEffectGets and sets the AnimationEffectReadOnly associated with this animation. This will usually be a KeyframeEffect object.
read onlyfinished:Promise<Animation>Returns the current finished Promise for this animation.
id:StringGets and sets the String used to identify the animation.
oncancel:FunctionGets and sets the event handler for the cancel event.
onfinish:FunctionGets and sets the event handler for the finish event.
read onlypending:BoolIndicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
read onlyplayState:AnimationPlayStateReturns an enumerated value describing the playback state of an animation.
playbackRate:FloatGets or sets the playback rate of the animation.
read onlyready:Promise<Animation>Returns the current ready Promise for this animation.
startTime:FloatGets or sets the scheduled time when an animation's playback should begin.
timeline:AnimationTimelineGets or sets the AnimationTimeline associated with this animation.
cancel():VoidClears all KeyframeEffect caused by this animation and aborts its playback.
finish():VoidSeeks either end of an animation, depending on whether the animation is playing or reversing.
Throws:
null |
DOMError |
|---|
pause():VoidSuspends playing of an animation.
Throws:
null |
DOMError |
|---|
play():VoidStarts or resumes playing of an animation, or begins the animation again if it previously finished.
Throws:
null |
DOMError |
|---|
reverse():VoidReverses playback direction, stopping at the start of the animation. If the animation is finished or unplayed, it will play from end to beginning.
Throws:
null |
DOMError |
|---|
updatePlaybackRate(playbackRate:Float):VoidSets the speed of an animation after first synchronizing its playback position.
© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/Animation.html