Skip to content

Commit 3457eee

Browse files
tidoustbirtles
authored andcommitted
[web-animations-2] Make WebIDL valid
Previous fix made WebIDL parse-able: w3c#6267 However, the WebIDL remains invalid because `void` has now been replaced by `undefined` in WebIDL and because optional dictionary parameters with no required members need to have a default value. This update fixes these validity issues.
1 parent 116267d commit 3457eee

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

web-animations-2/Overview.bs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,10 +1938,10 @@ partial interface AnimationEffect {
19381938
readonly attribute AnimationEffect? previousSibling;
19391939
readonly attribute AnimationEffect? nextSibling;
19401940

1941-
void before (AnimationEffect... effects);
1942-
void after (AnimationEffect... effects);
1943-
void replace (AnimationEffect... effects);
1944-
void remove ();
1941+
undefined before (AnimationEffect... effects);
1942+
undefined after (AnimationEffect... effects);
1943+
undefined replace (AnimationEffect... effects);
1944+
undefined remove ();
19451945
};
19461946
</pre>
19471947

@@ -1971,7 +1971,7 @@ partial interface AnimationEffect {
19711971
<div class='methods'>
19721972

19731973
: <dfn method for=AnimationEffect lt='before()'>
1974-
void before (AnimationEffect... effects)</dfn>
1974+
undefined before (AnimationEffect... effects)</dfn>
19751975
:: Inserts <var>effects</var> before this <a>animation effect</a>.
19761976

19771977
1. If there is no <a>parent group</a>, abort these steps.
@@ -1991,7 +1991,7 @@ effect.before(effect); // throws HierarchyRequestError</pre>
19911991
</div>
19921992

19931993
: <dfn method for=AnimationEffect lt='after()'>
1994-
void after(AnimationEffect... effects)</dfn>
1994+
undefined after(AnimationEffect... effects)</dfn>
19951995
:: Inserts <var>effects</var> after this <a>animation effect</a>.
19961996

19971997
1. If there is no <a>parent group</a>, abort these steps.
@@ -2006,7 +2006,7 @@ effect.before(effect); // throws HierarchyRequestError</pre>
20062006
<var>reference child</var>.
20072007

20082008
: <dfn method for=AnimationEffect lt='replace()'>
2009-
void replace(AnimationEffect... effects)</dfn>
2009+
undefined replace(AnimationEffect... effects)</dfn>
20102010
:: Replaces this {{AnimationEffect}} with the passed in
20112011
<var>effects</var>.
20122012

@@ -2023,7 +2023,7 @@ effect.before(effect); // throws HierarchyRequestError</pre>
20232023
5. <a lt="insert children">Insert</a> <var>effects</var> before
20242024
<var>reference child</var>.
20252025

2026-
: <dfn method for=AnimationEffect lt='remove()'>void remove()</dfn>
2026+
: <dfn method for=AnimationEffect lt='remove()'>undefined remove()</dfn>
20272027
:: <a lt="remove an animation effect">Removes</a> this <a>animation
20282028
effect</a> from its <a>parent group</a> or <a>animation</a>.
20292029

@@ -2149,15 +2149,15 @@ interface.
21492149
[Exposed=Window]
21502150
interface GroupEffect {
21512151
constructor(sequence&lt;AnimationEffect>? children,
2152-
optional (unrestricted double or EffectTiming) timing);
2152+
optional (unrestricted double or EffectTiming) timing = {});
21532153

21542154
readonly attribute AnimationNodeList children;
21552155
readonly attribute AnimationEffect? firstChild;
21562156
readonly attribute AnimationEffect? lastChild;
21572157
GroupEffect clone ();
21582158

2159-
void prepend (AnimationEffect... effects);
2160-
void append (AnimationEffect... effects);
2159+
undefined prepend (AnimationEffect... effects);
2160+
undefined append (AnimationEffect... effects);
21612161
};
21622162
</pre>
21632163

@@ -2231,7 +2231,7 @@ interface GroupEffect {
22312231
<div class="methods">
22322232

22332233
: <dfn method for=GroupEffect lt="prepend()">
2234-
: void prepend (AnimationEffect... effects)</dfn>
2234+
: undefined prepend (AnimationEffect... effects)</dfn>
22352235
::
22362236

22372237
1. If any of the <a>animation effects</a> in <var>effects</var> is an
@@ -2242,7 +2242,7 @@ interface GroupEffect {
22422242
the <a>first child</a>.
22432243

22442244
: <dfn method for=GroupEffect lt="append()">
2245-
void append (AnimationEffect... effects)</dfn>
2245+
undefined append (AnimationEffect... effects)</dfn>
22462246
::
22472247

22482248
1. If any of the <a>animation effects</a> in <var>effects</var> is an
@@ -2399,7 +2399,7 @@ interface AnimationNodeList {
23992399
[Exposed=Window]
24002400
interface SequenceEffect : GroupEffect {
24012401
constructor(sequence&lt;AnimationEffect>? children,
2402-
optional (unrestricted double or EffectTiming) timing);
2402+
optional (unrestricted double or EffectTiming) timing = {});
24032403

24042404
SequenceEffect clone ();
24052405
};
@@ -2543,7 +2543,7 @@ enum IterationCompositeOperation { "replace", "accumulate" };
25432543
{{EffectCallback}} callback function.
25442544

25452545
<pre class='idl'>
2546-
callback EffectCallback = void (double? progress,
2546+
callback EffectCallback = undefined (double? progress,
25472547
(Element or CSSPseudoElement) currentTarget,
25482548
Animation animation);
25492549
</pre>

0 commit comments

Comments
 (0)