Skip to content

Commit 1aa19df

Browse files
committed
[web-animations-2] Add rangeStart/rangeEnd to Animatable interface #7589
1 parent b15b501 commit 1aa19df

File tree

1 file changed

+67
-2
lines changed

1 file changed

+67
-2
lines changed

web-animations-2/Overview.bs

+67-2
Original file line numberDiff line numberDiff line change
@@ -3028,10 +3028,40 @@ with which it is associated is updated.
30283028

30293029
</ins>
30303030

3031-
<h3 id="the-animatable-interface">The <code>Animatable</code> interface</h3>
3031+
The <code>Animatable</code> interface mixin {#the-animatable-interface-mixin}
3032+
----------------------------------------
30323033

3033-
<div class="methods">
3034+
Objects that may be the target of an {{KeyframeEffect}} object implement
3035+
the {{Animatable}} interface mixin.
3036+
3037+
<pre class='idl'>
3038+
interface mixin Animatable {
3039+
Animation animate(object? keyframes,
3040+
optional (unrestricted double or KeyframeAnimationOptions) options = {});
3041+
sequence&lt;Animation&gt; getAnimations(optional GetAnimationsOptions options = {});
3042+
};
3043+
3044+
dictionary TimelineRangeOffset {
3045+
CSSOMString? rangeName;
3046+
CSSNumericValue offset;
3047+
};
3048+
3049+
dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
3050+
DOMString id = "";
3051+
AnimationTimeline? timeline;
3052+
3053+
(TimelineRangeOffset or CSSNumericValue or DOMString) rangeStart = "normal";
3054+
(TimelineRangeOffset or CSSNumericValue or DOMString) rangeEnd = "normal";
3055+
};
30343056

3057+
dictionary GetAnimationsOptions {
3058+
boolean subtree = false;
3059+
};
3060+
</pre>
3061+
3062+
ISSUE: Should rangeStart/rangeEnd also accept CSSNumericValue directly (for cases that don't want a rangeName)?
3063+
3064+
<div class="methods">
30353065
: <dfn method for=Animatable lt="getAnimations()">
30363066
sequence&lt;Animation&gt; getAnimations()</dfn>
30373067
:: Add:
@@ -3043,6 +3073,41 @@ with which it is associated is updated.
30433073

30443074
</div>
30453075

3076+
<div class="members">
3077+
: <dfn dict-member for=KeyframeAnimationOptions>id</dfn>
3078+
:: The string to assign to the generated {{Animation}}'s
3079+
{{Animation/id}} attribute.
3080+
3081+
: <dfn dict-member for=KeyframeAnimationOptions>timeline</dfn>
3082+
:: An optional value which, if present,
3083+
specifies the <a>timeline</a> with which to associate
3084+
the newly-created <a>animation</a>.
3085+
3086+
: <dfn dict-member for=KeyframeAnimationOptions>rangeStart</dfn>
3087+
:: An optional value which, if present,
3088+
specifies the start of the <a>animation</a>’s [=timeline attachment range=].
3089+
A {{DOMString}} value is parsed as an 'animation-range-end' value
3090+
to yield a {{TimelineRangeOffset}} {{TimelineRangeOffset/rangeName}}
3091+
and {{TimelineRangeOffset/offset}};
3092+
a {{CSSNumericValue}} is interpreted as a {{TimelineRangeOffset}}
3093+
with that {{TimelineRangeOffset/offset}} and a null {{TimelineRangeOffset/rangeName}}.
3094+
The {{TimelineRangeOffset/rangeName}} and {{TimelineRangeOffset/offset}}
3095+
are the interpreted as defined for 'animation-range-end'.
3096+
3097+
: <dfn dict-member for=KeyframeAnimationOptions>rangeEnd</dfn>
3098+
:: An optional value which, if present,
3099+
specifies the end of the <a>animation</a>’s [=timeline attachment range=].
3100+
A {{DOMString}} value is parsed as an 'animation-range-end' value
3101+
to yield a {{TimelineRangeOffset}} {{TimelineRangeOffset/rangeName}}
3102+
and {{TimelineRangeOffset/offset}};
3103+
a {{CSSNumericValue}} is interpreted as a {{TimelineRangeOffset}}
3104+
with that {{TimelineRangeOffset/offset}} and a null {{TimelineRangeOffset/rangeName}}.
3105+
The {{TimelineRangeOffset/rangeName}} and {{TimelineRangeOffset/offset}}
3106+
are the interpreted as defined for 'animation-range-end'.
3107+
</div>
3108+
3109+
See [[web-animations-1#the-animatable-interface-mixin]] for further description.
3110+
30463111
<h3 id="the-animationplaybackevent-interface">The <code>AnimationPlaybackEvent</code> interface </h3>
30473112

30483113
Replace double with CSSNumberish as the type for currentTime and timelineTime.

0 commit comments

Comments
 (0)