Skip to content

Commit

Permalink
[web-animations-2] Expand offset syntax for keyframes w3c#7637
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasai committed Mar 24, 2023
1 parent 1aa19df commit 2e2f6b5
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions web-animations-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2937,6 +2937,27 @@ new SequenceEffect(

</div>

<h4 id="keyframe-offset-type">Modification to the <code>*Keyframe</code> dictionaries</h4>

The <code>double?</code> type of the <code>offset</code> key
in <code>ComputedKeyframe</code>,
<code>BaseComputedKeyframe</code>,
<code>BaseKeyframe</code>,
<code>BasePropertyIndexedKeyframe</code>,
etc.
is replaced by <code>(CSSNumberish? or TimelineRangeOffset or DOMString)</code>,
where <code>double</code> continues to be interpreted as a percentage,
a {{DOMString}} is parsed into a {{TimelineRangeOffset}}
according to the syntax of the ''@keyframes'' prelude,
and the resulting {{TimelineRangeOffset}} or {{CSSNumericValue}}
is interpreted as defined for ''@keyframes''.

If the {{DOMString}} fails to parse as a valid ''@keyframes'' prelude,
then the keyframe is invalid,
and will throw a <span class=exceptionname>TypeError</span>
when [[web-animations-1#processing-a-keyframes-argument|processed]]
(same as if the <code>doube</code> value was outside the [0,1] range).

<h4 id="the-keyframeeffectoptions-dictionary">The KeyframeEffectOptions dictionary</h4>

The {{KeyframeEffectOptions}} dictionary interface is modified to add the
Expand Down

0 comments on commit 2e2f6b5

Please sign in to comment.