mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:27:45 +00:00
LibWeb: Add the Animation IDL object
This commit is contained in:
parent
0df06ce273
commit
1ca46afa2f
6 changed files with 270 additions and 0 deletions
42
Userland/Libraries/LibWeb/Animations/Animation.idl
Normal file
42
Userland/Libraries/LibWeb/Animations/Animation.idl
Normal file
|
@ -0,0 +1,42 @@
|
|||
#import <Animations/AnimationEffect.idl>
|
||||
#import <Animations/AnimationTimeline.idl>
|
||||
|
||||
// https://www.w3.org/TR/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;
|
||||
attribute AnimationTimeline? timeline;
|
||||
attribute double? startTime;
|
||||
attribute double? currentTime;
|
||||
attribute double playbackRate;
|
||||
readonly attribute AnimationPlayState playState;
|
||||
readonly attribute AnimationReplaceState replaceState;
|
||||
// FIXME:
|
||||
// readonly attribute boolean pending;
|
||||
readonly attribute Promise<Animation> ready;
|
||||
readonly attribute Promise<Animation> finished;
|
||||
|
||||
// FIXME:
|
||||
// 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();
|
||||
};
|
||||
|
||||
// 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" };
|
Loading…
Add table
Add a link
Reference in a new issue