Skip to content

Commit

Permalink
[worklets] Add [[Worklets]] internal slot to window.
Browse files Browse the repository at this point in the history
Fixes #385.
  • Loading branch information
bfgeek committed Apr 14, 2017
1 parent 3fcc307 commit 327b310
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion worklets/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ spec:html; type:dfn; for:environment settings object;
text: https state
text: referrer policy
spec:html; type:dfn; for:environment; text:id
spec:infra; type:dfn; text:list
spec:webidl; type:dfn; for:interface; text:inherit
</pre>

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

The lifetime of a {{Worklet}} is tied to the object it belongs to, for example the {{Window}}.
{{Window}} objects have a <dfn export>\[[Worklets]]</dfn> internal slot. This contains a <a>list</a>
which is initially empty. When a {{Worklet}} is created it is <a for=list>appended</a> to this list.
A {{Worklet}} cannot outlive the {{Window}} which it belongs to.

Note: Most {{Worklet}}s will be instantiated lazily when the web developer wants to use them, it is
expected that they won't be created eagerly with the {{Window}} object.

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

0 comments on commit 327b310

Please sign in to comment.