@@ -249,32 +249,32 @@ Each <a>animator instance</a> lives in an {{AnimationWorkletGlobalScope}}. The
249
249
<a>animator instance</a> cannot be disposed arbitrarily (e.g., in the middle of running animation
250
250
as it may contain the scripted animation state.
251
251
252
- The {{AnimationWorkletGlobalScope}} has an <dfn>animator instance list</dfn> . Anytime a new
252
+ The {{AnimationWorkletGlobalScope}} has an <dfn>animator instance list</dfn> . Anytime a new
253
253
<a>animator instance</a> is constructed in that scope, it gets added to the list.
254
254
255
- To <dfn>create a new animator instance</dfn> given |name |, |outside port |, and |workletGlobalScope|,
255
+ To <dfn>create a new animator instance</dfn> given a |root element |, |name |, and |workletGlobalScope|,
256
256
the user agent <em> must</em> run the following steps:
257
257
258
- 1. Let the |definition| be the result of looking up |name| on the |workletGlobalScope|'s
259
- <a>animator name to animator definition map</a> .
258
+ 1. If an |animatorInstance| with the same |name| and |root element| exists within the <a>animator
259
+ instance list</a> then abort the following steps .
260
260
261
- If |definition| does not exist abort the following steps.
261
+ 2. Let the |definition| be the result of looking up |name| on the |workletGlobalScope|'s
262
+ <a>animator name to animator definition map</a> .
262
263
263
- Issue: We should check the animator instance list to make sure we don't create duplicate
264
- instances for the same name and element.
264
+ If |definition| does not exist abort the following steps.
265
265
266
- 2 . Let |animatorCtor| be the <a>class constructor</a> of |definition|.
266
+ 3 . Let |animatorCtor| be the <a>class constructor</a> of |definition|.
267
267
268
- 3 . Let |animatorInstance| be the result of <a>Construct</a> (|animatorCtor|).
268
+ 4 . Let |animatorInstance| be the result of <a>Construct</a> (|animatorCtor|).
269
269
270
270
Issue: handle invalid construction.
271
-
272
- 4 . Set the following on |animatorInstance| with:
271
+
272
+ 5 . Set the following on |animatorInstance| with:
273
273
- <a>animator name</a> being |name|
274
274
275
275
- <a>animation request flag</a> being <a>frame-current</a>
276
276
277
- 5 . Add |animatorInstance| to <a>animator instance list</a> .
277
+ 6 . Add |animatorInstance| to <a>animator instance list</a> .
278
278
279
279
280
280
Creating an Element Proxy {#creating-element-proxy}
0 commit comments