ladybird/Libraries/LibWeb/Animations/Animation.idl

42 lines
1.5 KiB
Text
Raw Normal View History

2023-11-06 15:17:19 +00:00
#import <Animations/AnimationEffect.idl>
#import <Animations/AnimationTimeline.idl>
2023-11-08 11:04:56 -07:00
#import <DOM/EventTarget.idl>
2023-11-06 15:17:19 +00:00
// https://www.w3.org/TR/web-animations-1/#the-animation-interface
[Exposed=Window]
interface Animation : EventTarget {
constructor(optional AnimationEffect? effect = null,
[ExplicitNull] optional AnimationTimeline? timeline);
2023-11-06 15:17:19 +00:00
attribute DOMString id;
attribute AnimationEffect? effect;
attribute AnimationTimeline? timeline;
attribute double? startTime;
attribute double? currentTime;
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;
2023-11-06 15:17:19 +00:00
attribute EventHandler onfinish;
attribute EventHandler oncancel;
attribute EventHandler onremove;
2024-02-05 20:37:47 -07:00
undefined cancel();
2024-02-05 20:18:00 -07:00
undefined finish();
2023-11-05 09:52:45 -07:00
undefined play();
2024-02-04 17:21:05 -07:00
undefined pause();
undefined updatePlaybackRate(double playbackRate);
2024-02-10 16:00:08 -07:00
undefined reverse();
2024-02-05 20:39:27 -07:00
undefined persist();
[FIXME, CEReactions] undefined commitStyles();
2023-11-06 15:17:19 +00:00
};
// https://www.w3.org/TR/web-animations-1/#the-animationplaystate-enumeration
enum AnimationPlayState { "idle", "running", "paused", "finished" };
// https://www.w3.org/TR/web-animations-1/#the-animationreplacestate-enumeration
enum AnimationReplaceState { "active", "removed", "persisted" };