diff --git a/worklets/Overview.bs b/worklets/Overview.bs index 29739e51..2baaa088 100644 --- a/worklets/Overview.bs +++ b/worklets/Overview.bs @@ -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 @@ -49,6 +50,8 @@ urlPrefix: https://html.spec.whatwg.org/multipage/workers.html; type: dfn; urlPrefix: #dom-workerglobalscope-; text: self urlPrefix: https://html.spec.whatwg.org/multipage/webappapis.html; type: dfn; + text: abort a running script + text: currently running task text: document environment text: event loop processing model text: microtask queue @@ -194,7 +197,10 @@ When a user agent is to create a WorkletGlobalScope, given |workletGl 4. Associate the |insideSettings| with |workletGlobalScope|. - 5. For each |entry| in the given |moduleResponsesMap| (in insertion order), run the following + 5. Set |workletGlobalScope|'s owner document be |outsideSettings|'s + responsible document. + + 6. For each |entry| in the given |moduleResponsesMap| (in insertion order), run the following substeps: 1. Let |moduleURLRecord| be |entry|'s key. @@ -210,7 +216,7 @@ When a user agent is to create a WorkletGlobalScope, given |workletGl point it should have successfully been parsed by another worklet global scope. I.e. |script| should never be null here. - 6. Run the responsible event loop specified by |insideSettings|. + 7. Run the responsible event loop specified by |insideSettings|. ### Script settings for worklets ### {#script-settings-for-worklets} @@ -497,14 +503,38 @@ 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}}. +A {{WorkletGlobalScope}} has a owner document. + +When the owner document is discarded the user agent must destroy all {{WorkletGlobalScope}}s. + +