mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-28 02:27:19 +02:00
When constructing an Animation a null should be distinguished from nothing being passed at all. This is not achieved by use of our custom ExplicitNull IDL extended attribute. Instead use the argument count to determine if the argument is missing, which is a much more common pattern in the codebase.
42 lines
1.6 KiB
Plaintext
42 lines
1.6 KiB
Plaintext
#import <Animations/AnimationEffect.idl>
|
|
#import <Animations/AnimationTimeline.idl>
|
|
#import <DOM/EventTarget.idl>
|
|
|
|
// https://drafts.csswg.org/web-animations-1/#the-animation-interface
|
|
[Exposed=Window]
|
|
interface Animation : EventTarget {
|
|
constructor(optional AnimationEffect? effect = null,
|
|
optional AnimationTimeline? timeline);
|
|
|
|
attribute DOMString id;
|
|
attribute AnimationEffect? effect;
|
|
[ImplementedAs=timeline_for_bindings] attribute AnimationTimeline? timeline;
|
|
[ImplementedAs=start_time_for_bindings] attribute CSSNumberish? startTime;
|
|
[ImplementedAs=current_time_for_bindings] attribute CSSNumberish? currentTime;
|
|
attribute double playbackRate;
|
|
[ImplementedAs=play_state_for_bindings] 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();
|
|
[FIXME, CEReactions] undefined commitStyles();
|
|
};
|
|
|
|
// https://drafts.csswg.org/web-animations-1/#the-animationplaystate-enumeration
|
|
enum AnimationPlayState { "idle", "running", "paused", "finished" };
|
|
|
|
// https://drafts.csswg.org/web-animations-1/#the-animationreplacestate-enumeration
|
|
enum AnimationReplaceState { "active", "removed", "persisted" };
|