KeyframeEffect.idl 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #import <Animations/AnimationEffect.idl>
  2. #import <DOM/Element.idl>
  3. // https://www.w3.org/TR/web-animations-1/#the-compositeoperation-enumeration
  4. enum CompositeOperation { "replace", "add", "accumulate" };
  5. // https://www.w3.org/TR/web-animations-1/#enumdef-compositeoperationorauto
  6. enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };
  7. // https://www.w3.org/TR/web-animations-1/#the-keyframeeffectoptions-dictionary
  8. dictionary KeyframeEffectOptions : EffectTiming {
  9. CompositeOperation composite = "replace";
  10. CSSOMString? pseudoElement = null;
  11. };
  12. // https://www.w3.org/TR/web-animations-1/#dictdef-basepropertyindexedkeyframe
  13. dictionary BasePropertyIndexedKeyframe {
  14. (double? or sequence<double?>) offset = [];
  15. (DOMString or sequence<DOMString>) easing = [];
  16. (CompositeOperationOrAuto or sequence<CompositeOperationOrAuto>) composite = [];
  17. };
  18. // https://www.w3.org/TR/web-animations-1/#dictdef-basekeyframe
  19. dictionary BaseKeyframe {
  20. double? offset = null;
  21. DOMString easing = "linear";
  22. CompositeOperationOrAuto composite = "auto";
  23. };
  24. // https://www.w3.org/TR/web-animations-1/#the-keyframeeffect-interface
  25. [Exposed=Window]
  26. interface KeyframeEffect : AnimationEffect {
  27. constructor(Element? target, object? keyframes, optional (unrestricted double or KeyframeEffectOptions) options = {});
  28. constructor(KeyframeEffect source);
  29. attribute Element? target;
  30. attribute CSSOMString? pseudoElement;
  31. attribute CompositeOperation composite;
  32. sequence<object> getKeyframes();
  33. undefined setKeyframes(object? keyframes);
  34. };