Definition
Web Animations defines Animation
[Exposed=Window]
interface Animation : EventTarget {
constructor(optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline);
attribute DOMString id;
attribute AnimationEffect? effect;
attribute AnimationTimeline? timeline;
attribute double playbackRate;
readonly attribute AnimationPlayState playState;
readonly attribute AnimationReplaceState replaceState;
readonly attribute boolean pending;
readonly attribute Promise<Animation> ready;
readonly attribute Promise<Animation> finished;
attribute EventHandler onfinish;
attribute EventHandler oncancel;
attribute EventHandler onremove;
undefined cancel();
undefined finish();
undefined play();
undefined pause();
undefined updatePlaybackRate(double playbackRate);
undefined reverse();
undefined persist();
[CEReactions]
undefined commitStyles();
};
This interface is extended in the following specifications:
- Web Animations Level 2
[Exposed=Window] partial interface Animation { attribute CSSNumberish? startTime; attribute CSSNumberish? currentTime; readonly attribute double? progress; };
Consolidated IDL (across mixin and partials)
[Exposed=Window]
interface Animation : EventTarget {
constructor(optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline);
attribute DOMString id;
attribute AnimationEffect? effect;
attribute AnimationTimeline? timeline;
attribute double playbackRate;
readonly attribute AnimationPlayState playState;
readonly attribute AnimationReplaceState replaceState;
readonly attribute boolean pending;
readonly attribute Promise<Animation> ready;
readonly attribute Promise<Animation> finished;
attribute EventHandler onfinish;
attribute EventHandler oncancel;
attribute EventHandler onremove;
undefined cancel();
undefined finish();
undefined play();
undefined pause();
undefined updatePlaybackRate(double playbackRate);
undefined reverse();
undefined persist();
[CEReactions]
undefined commitStyles();
attribute CSSNumberish? startTime;
attribute CSSNumberish? currentTime;
readonly attribute double? progress;
};
Methods and attributes that return objects implementing Animation
Referring IDL interfaces/dictionaries
Referring specifications
- CSS Animation Worklet API refers to
Animation
- CSS Animations Level 2 refers to
Animation
- CSS Transitions Level 2 refers to
Animation
- Scalable Vector Graphics (SVG) 2 refers to
Animation
- Web Animations Level 2 refers to
Animation