Skip to content

Commit b7f03e9

Browse files
committed
[web-animations-2] Expand offset syntax for keyframes #7637
1 parent 24f63cb commit b7f03e9

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

web-animations-2/Overview.bs

+21
Original file line numberDiff line numberDiff line change
@@ -2937,6 +2937,27 @@ new SequenceEffect(
29372937

29382938
</div>
29392939

2940+
<h4 id="keyframe-offset-type">Modification to the <code>*Keyframe</code> dictionaries</h4>
2941+
2942+
The <code>double?</code> type of the <code>offset</code> key
2943+
in <code>ComputedKeyframe</code>,
2944+
<code>BaseComputedKeyframe</code>,
2945+
<code>BaseKeyframe</code>,
2946+
<code>BasePropertyIndexedKeyframe</code>,
2947+
etc.
2948+
is replaced by <code>(CSSNumberish? or TimelineRangeOffset or DOMString)</code>,
2949+
where <code>double</code> continues to be interpreted as a percentage,
2950+
a {{DOMString}} is parsed into a {{TimelineRangeOffset}}
2951+
according to the syntax of <<keyframe-selector>>,
2952+
and the resulting {{TimelineRangeOffset}} or {{CSSNumericValue}}
2953+
is interpreted as defined for ''@keyframes''.
2954+
2955+
If the {{DOMString}} fails to parse as a valid <<keyframe-selector>>,
2956+
then the keyframe is invalid,
2957+
and will throw a <span class=exceptionname>TypeError</span>
2958+
when [[web-animations-1#processing-a-keyframes-argument|processed]]
2959+
(same as if the <code>doube</code> value was outside the [0,1] range).
2960+
29402961
<h4 id="the-keyframeeffectoptions-dictionary">The KeyframeEffectOptions dictionary</h4>
29412962

29422963
The {{KeyframeEffectOptions}} dictionary interface is modified to add the

0 commit comments

Comments
 (0)