@@ -151,17 +151,27 @@ Animation Worklet {#animation-worklet-desc}
151151<dfn>Animation Worklet</dfn> is a {{Worklet}} responsible for all classes related to custom
152152animations. 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]
160156partial 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
167177Animator {#animator-desc}
@@ -286,18 +296,6 @@ Registering an Animator Definition {#registering-animator-definition}
286296An {{AnimationWorkletGlobalScope}} has a <dfn>animator name to animator definition map</dfn> .
287297The 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-
301299Note that to register a <a>stateful animator definition</a> it is simply enough for the registered
302300class to have a <code> state</code> function.
303301
0 commit comments