Skip to content

Commit

Permalink
Update interfaces/web-animations.idl
Browse files Browse the repository at this point in the history
  • Loading branch information
autofoolip committed May 24, 2019
1 parent 098e651 commit e4cd68f
Showing 1 changed file with 32 additions and 24 deletions.
56 changes: 32 additions & 24 deletions interfaces/web-animations.idl
Expand Up @@ -13,13 +13,13 @@ dictionary DocumentTimelineOptions {
};

[Exposed=Window,
Constructor (optional DocumentTimelineOptions options)]
Constructor(optional DocumentTimelineOptions options)]
interface DocumentTimeline : AnimationTimeline {
};

[Exposed=Window,
Constructor (optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline)]
Constructor(optional AnimationEffect? effect = null,
optional AnimationTimeline? timeline)]
interface Animation : EventTarget {
attribute DOMString id;
attribute AnimationEffect? effect;
Expand All @@ -35,14 +35,14 @@ interface Animation : EventTarget {
attribute EventHandler onfinish;
attribute EventHandler oncancel;
attribute EventHandler onremove;
void cancel ();
void finish ();
void play ();
void pause ();
void updatePlaybackRate (double playbackRate);
void reverse ();
void persist ();
void commitStyles ();
void cancel();
void finish();
void play();
void pause();
void updatePlaybackRate(double playbackRate);
void reverse();
void persist();
void commitStyles();
};

enum AnimationPlayState { "idle", "running", "paused", "finished" };
Expand Down Expand Up @@ -91,16 +91,16 @@ dictionary ComputedEffectTiming : EffectTiming {
};

[Exposed=Window,
Constructor ((Element or CSSPseudoElement)? target,
object? keyframes,
optional (unrestricted double or KeyframeEffectOptions) options),
Constructor (KeyframeEffect source)]
Constructor((Element or CSSPseudoElement)? target,
object? keyframes,
optional (unrestricted double or KeyframeEffectOptions) options),
Constructor(KeyframeEffect source)]
interface KeyframeEffect : AnimationEffect {
attribute (Element or CSSPseudoElement)? target;
attribute IterationCompositeOperation iterationComposite;
attribute CompositeOperation composite;
sequence<object> getKeyframes ();
void setKeyframes (object? keyframes);
sequence<object> getKeyframes();
void setKeyframes(object? keyframes);
};

dictionary BaseComputedKeyframe {
Expand All @@ -127,23 +127,31 @@ dictionary KeyframeEffectOptions : EffectTiming {
CompositeOperation composite = "replace";
};

enum IterationCompositeOperation {"replace", "accumulate"};
enum IterationCompositeOperation { "replace", "accumulate" };

enum CompositeOperation {"replace", "add", "accumulate"};
enum CompositeOperation { "replace", "add", "accumulate" };

enum CompositeOperationOrAuto {"replace", "add", "accumulate", "auto"};
enum CompositeOperationOrAuto { "replace", "add", "accumulate", "auto" };

interface mixin Animatable {
Animation animate (object? keyframes,
optional (unrestricted double or KeyframeAnimationOptions) options);
sequence<Animation> getAnimations ();
Animation animate(object? keyframes,
optional (unrestricted double or KeyframeAnimationOptions) options);
sequence<Animation> getAnimations(optional GetAnimationsOptions options);
};

dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
DOMString id = "";
};

dictionary GetAnimationsOptions {
boolean subtree = false;
};

partial interface Document {
readonly attribute DocumentTimeline timeline;
};

partial interface mixin DocumentOrShadowRoot {
sequence<Animation> getAnimations();
};

Expand All @@ -152,7 +160,7 @@ Element includes Animatable;
CSSPseudoElement includes Animatable;

[Exposed=Window,
Constructor (DOMString type, optional AnimationPlaybackEventInit eventInitDict)]
Constructor(DOMString type, optional AnimationPlaybackEventInit eventInitDict)]
interface AnimationPlaybackEvent : Event {
readonly attribute double? currentTime;
readonly attribute double? timelineTime;
Expand Down

0 comments on commit e4cd68f

Please sign in to comment.