Skip to content

Commit 8ac0506

Browse files
committed
[web-animations-2] Add rangeStart/rangeEnd to Animatable interface #7589
1 parent 32a9dbb commit 8ac0506

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

web-animations-2/Overview.bs

+51
Original file line numberDiff line numberDiff line change
@@ -3043,6 +3043,57 @@ with which it is associated is updated.
30433043

30443044
</div>
30453045

3046+
The <code>Animatable</code> interface mixin {#the-animatable-interface-mixin}
3047+
----------------------------------------
3048+
3049+
The {{KeyframeAnimationOptions}} dictionary interface
3050+
is modified to add the following members:
3051+
3052+
<pre class='idl'>
3053+
dictionary TimelineRangeOffset {
3054+
CSSOMString? rangeName;
3055+
CSSNumericValue offset;
3056+
};
3057+
3058+
partial dictionary KeyframeAnimationOptions : KeyframeEffectOptions {
3059+
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeStart = "normal";
3060+
(TimelineRangeOffset or CSSNumericValue or CSSKeywordValue or DOMString) rangeEnd = "normal";
3061+
};
3062+
</pre>
3063+
3064+
<div class="members">
3065+
: <dfn dict-member for=KeyframeAnimationOptions>rangeStart</dfn>
3066+
:: If present and not "normal",
3067+
specifies the start of the <a>animation</a>’s [=animation attachment range=].
3068+
A {{DOMString}} value is parsed as an 'animation-range-end' value
3069+
to yield a {{TimelineRangeOffset}} {{TimelineRangeOffset/rangeName}}
3070+
and {{TimelineRangeOffset/offset}}
3071+
or alternatively a {{CSSKeywordValue}} with the {{CSSKeywordValue/value}} of "normal";
3072+
a {{CSSNumericValue}} is interpreted as a {{TimelineRangeOffset}}
3073+
with that {{TimelineRangeOffset/offset}} and a null {{TimelineRangeOffset/rangeName}}.
3074+
3075+
: <dfn dict-member for=KeyframeAnimationOptions>rangeEnd</dfn>
3076+
:: If present and not "normal",
3077+
specifies the end of the <a>animation</a>’s [=animation attachment range=].
3078+
A {{DOMString}} value is parsed as an 'animation-range-end' value
3079+
to yield a {{TimelineRangeOffset}} {{TimelineRangeOffset/rangeName}}
3080+
and {{TimelineRangeOffset/offset}};
3081+
a {{CSSNumericValue}} is interpreted as a {{TimelineRangeOffset}}
3082+
with that {{TimelineRangeOffset/offset}} and a null {{TimelineRangeOffset/rangeName}}.
3083+
</div>
3084+
3085+
Passing a {{CSSKeywordValue}} with a {{CSSKeywordValue/value}} other than "normal"
3086+
as the {{KeyframeAnimationOptions/rangeStart}} or {{KeyframeAnimationOptions/rangeEnd}} value
3087+
to any API defined to accept {{KeyframeAnimationsOptions}}
3088+
[=throws=] a <span class="exceptionname">TypeError</span>.
3089+
3090+
Note: The {{TimelineRangeOffset/rangeName}} and {{TimelineRangeOffset/offset}}
3091+
values of {{KeyframeAnimationOptions/rangeStart}} and {{KeyframeAnimationOptions/rangeEnd}}
3092+
are interpreted as defined for 'animation-range-start'/'animation-range-end',
3093+
and affect the animation accordingly.
3094+
3095+
See [[web-animations-1#the-animatable-interface-mixin]] for further description.
3096+
30463097
<h3 id="the-animationplaybackevent-interface">The <code>AnimationPlaybackEvent</code> interface </h3>
30473098

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

0 commit comments

Comments
 (0)