Skip to content

Commit 8448e98

Browse files
committed
[css-animationworklet-1] Move IDLs closer to their definition (w3c#926)
1 parent 36c2ea1 commit 8448e98

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

css-animationworklet/Overview.bs

+14-16
Original file line numberDiff line numberDiff line change
@@ -151,17 +151,27 @@ Animation Worklet {#animation-worklet-desc}
151151
<dfn>Animation Worklet</dfn> is a {{Worklet}} responsible for all classes related to custom
152152
animations. The worklet can be accessed via {{animationWorklet}} attribute.
153153

154-
The {{animationWorklet}}'s <a>worklet global scope type</a> is {{AnimationWorkletGlobalScope}}.
155-
156-
{{AnimationWorkletGlobalScope}} represents the global execution context of {{animationWorklet}}.
157-
158154
<xmp class='idl'>
159155
[Exposed=Window]
160156
partial namespace CSS {
161157
[SameObject] readonly attribute Worklet animationWorklet;
162158
};
163159
</xmp>
164160

161+
The {{animationWorklet}}'s <a>worklet global scope type</a> is {{AnimationWorkletGlobalScope}}.
162+
163+
{{AnimationWorkletGlobalScope}} represents the global execution context of {{animationWorklet}}.
164+
165+
<xmp class='idl'>
166+
167+
[ Global=(Worklet,AnimationWorklet), Exposed=AnimationWorklet ]
168+
interface AnimationWorkletGlobalScope : WorkletGlobalScope {
169+
void registerAnimator(DOMString name, AnimatorInstanceConstructor animatorCtor);
170+
};
171+
172+
callback AnimatorInstanceConstructor = any (any options, optional any state);
173+
174+
</xmp>
165175

166176

167177
Animator {#animator-desc}
@@ -286,18 +296,6 @@ Registering an Animator Definition {#registering-animator-definition}
286296
An {{AnimationWorkletGlobalScope}} has a <dfn>animator name to animator definition map</dfn>.
287297
The map gets populated when {{registerAnimator(name, animatorCtor)}} is called.
288298

289-
290-
<xmp class='idl'>
291-
292-
[ Global=(Worklet,AnimationWorklet), Exposed=AnimationWorklet ]
293-
interface AnimationWorkletGlobalScope : WorkletGlobalScope {
294-
void registerAnimator(DOMString name, AnimatorInstanceConstructor animatorCtor);
295-
};
296-
297-
callback AnimatorInstanceConstructor = any (any options, optional any state);
298-
299-
</xmp>
300-
301299
Note that to register a <a>stateful animator definition</a> it is simply enough for the registered
302300
class to have a <code>state</code> function.
303301

0 commit comments

Comments
 (0)