mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:07:36 +00:00
LibWeb: Add KeyframeEffect IDL objects
This commit is contained in:
parent
99bb5a1d08
commit
5824916f8c
8 changed files with 303 additions and 0 deletions
43
Userland/Libraries/LibWeb/Animations/KeyframeEffect.idl
Normal file
43
Userland/Libraries/LibWeb/Animations/KeyframeEffect.idl
Normal file
|
@ -0,0 +1,43 @@
|
|||
#import <Animations/AnimationEffect.idl>
|
||||
#import <DOM/Element.idl>
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-compositeoperation-enumeration
|
||||
enum CompositeOperation { "replace", "add", "accumulate" };
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#enumdef-compositeoperationorauto
|
||||
enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-keyframeeffectoptions-dictionary
|
||||
dictionary KeyframeEffectOptions : EffectTiming {
|
||||
CompositeOperation composite = "replace";
|
||||
CSSOMString? pseudoElement = null;
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dictdef-basepropertyindexedkeyframe
|
||||
dictionary BasePropertyIndexedKeyframe {
|
||||
(double? or sequence<double?>) offset = [];
|
||||
(DOMString or sequence<DOMString>) easing = [];
|
||||
(CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#dictdef-basekeyframe
|
||||
dictionary BaseKeyframe {
|
||||
double? offset = null;
|
||||
DOMString easing = "linear";
|
||||
CompositeOperationOrAuto composite = "auto";
|
||||
};
|
||||
|
||||
// https://www.w3.org/TR/web-animations-1/#the-keyframeeffect-interface
|
||||
[Exposed=Window]
|
||||
interface KeyframeEffect : AnimationEffect {
|
||||
constructor(Element? target,
|
||||
object? keyframes,
|
||||
optional (unrestricted double or KeyframeEffectOptions) options = {});
|
||||
constructor(KeyframeEffect source);
|
||||
|
||||
attribute Element? target;
|
||||
attribute CSSOMString? pseudoElement;
|
||||
attribute CompositeOperation composite;
|
||||
sequence<object> getKeyframes();
|
||||
undefined setKeyframes(object? keyframes);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue