ladybird/Userland/Libraries/LibWeb/Animations/KeyframeEffect.idl

42 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-11-04 23:09:57 +03:00
#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;
2023-11-04 23:09:57 +03:00
};
// https://www.w3.org/TR/web-animations-1/#dictdef-basepropertyindexedkeyframe
dictionary BasePropertyIndexedKeyframe {
(double? or sequence<double?>) offset = [];
(DOMString or sequence<DOMString>) easing = [];
2023-11-04 23:09:57 +03:00
(CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
};
// https://www.w3.org/TR/web-animations-1/#dictdef-basekeyframe
dictionary BaseKeyframe {
double? offset = null;
DOMString easing = "linear";
2023-11-04 23:09:57 +03:00
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 = {});
2023-11-04 23:09:57 +03:00
constructor(KeyframeEffect source);
attribute Element? target;
attribute CSSOMString? pseudoElement;
2023-11-04 23:09:57 +03:00
attribute CompositeOperation composite;
sequence<object> getKeyframes();
undefined setKeyframes(object? keyframes);
2023-11-04 23:09:57 +03:00
};