@@ -151,17 +151,27 @@ Animation Worklet {#animation-worklet-desc}
151
151
<dfn>Animation Worklet</dfn> is a {{Worklet}} responsible for all classes related to custom
152
152
animations. The worklet can be accessed via {{animationWorklet}} attribute.
153
153
154
- The {{animationWorklet}} 's <a>worklet global scope type</a> is {{AnimationWorkletGlobalScope}} .
155
-
156
- {{AnimationWorkletGlobalScope}} represents the global execution context of {{animationWorklet}} .
157
-
158
154
<xmp class='idl'>
159
155
[Exposed=Window]
160
156
partial namespace CSS {
161
157
[SameObject] readonly attribute Worklet animationWorklet;
162
158
};
163
159
</xmp>
164
160
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>
165
175
166
176
167
177
Animator {#animator-desc}
@@ -286,18 +296,6 @@ Registering an Animator Definition {#registering-animator-definition}
286
296
An {{AnimationWorkletGlobalScope}} has a <dfn>animator name to animator definition map</dfn> .
287
297
The map gets populated when {{registerAnimator(name, animatorCtor)}} is called.
288
298
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
-
301
299
Note that to register a <a>stateful animator definition</a> it is simply enough for the registered
302
300
class to have a <code> state</code> function.
303
301
0 commit comments