Skip to content

Commit 327b310

Browse files
committed
[worklets] Add [[Worklets]] internal slot to window.
Fixes #385.
1 parent 3fcc307 commit 327b310

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

worklets/Overview.bs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ spec:html; type:dfn; for:environment settings object;
3434
text: https state
3535
text: referrer policy
3636
spec:html; type:dfn; for:environment; text:id
37+
spec:infra; type:dfn; text:list
3738
spec:webidl; type:dfn; for:interface; text:inherit
3839
</pre>
3940

@@ -497,7 +498,12 @@ Issue(w3c/css-houdini-drafts#47): Need ability to load code into a {{WorkletGlob
497498
Lifetime of the Worklet {#lifetime-of-the-worklet}
498499
--------------------------------------------------
499500

500-
The lifetime of a {{Worklet}} is tied to the object it belongs to, for example the {{Window}}.
501+
{{Window}} objects have a <dfn export>\[[Worklets]]</dfn> internal slot. This contains a <a>list</a>
502+
which is initially empty. When a {{Worklet}} is created it is <a for=list>appended</a> to this list.
503+
A {{Worklet}} cannot outlive the {{Window}} which it belongs to.
504+
505+
Note: Most {{Worklet}}s will be instantiated lazily when the web developer wants to use them, it is
506+
expected that they won't be created eagerly with the {{Window}} object.
501507

502508
The lifetime of a {{WorkletGlobalScope}} should be defined by subsequent specifications which
503509
inherit from {{WorkletGlobalScope}}.

0 commit comments

Comments
 (0)