ladybird/Userland/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
// FIXME: attribute EventHandler onfinish;
// FIXME: attribute EventHandler oncancel;
// FIXME: attribute EventHandler onremove;
// FIXME: undefined cancel();
// FIXME: undefined finish();
2023-11-05 09:52:45 -07:00
undefined play();
// FIXME: undefined pause();
// FIXME: undefined updatePlaybackRate(double playbackRate);
// FIXME: undefined reverse();
// FIXME: 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" };