@@ -191,17 +191,17 @@ spec: HTML; urlPrefix: https://html.spec.whatwg.org/multipage/
191
191
text: report an error; url: webappapis.html#report-the-error
192
192
text: run the animation frame callbacks; url: imagebitmap-and-animations.html#run-the-animation-frame-callbacks
193
193
text: same origin domain; url: browsers.html#same-origin-domain
194
- text: session history; url: history.html#session-history
195
194
text: session history entry; url: browsing-the-web.html#session-history-entry
196
195
text: session history traversal queue; url: document-sequences.html#tn-session-history-traversal-queue
196
+ text: session history; url: history.html#session-history
197
197
text: set up a window environment settings object; url: window-object.html#set-up-a-window-environment-settings-object
198
198
text: set up a worker environment settings object; url: workers.html#set-up-a-worker-environment-settings-object
199
199
text: set up a worklet environment settings object; url: worklets.html#set-up-a-worklet-environment-settings-object
200
200
text: shared worker; url: workers.html#shared-workers
201
201
text: system visibility state; url: document-sequences.html#system-visibility-state
202
202
text: traversable navigable; url:document-sequences.html#traversable-navigable
203
- text: visible; url: document-sequences.html#system-visibility-state
204
203
text: traverse the history by a delta; url: browsing-the-web.html#traverse-the-history-by-a-delta
204
+ text: visible; url: document-sequences.html#system-visibility-state
205
205
text: window open steps; url: window-object.html#window-open-steps
206
206
text: worker event loop; url: webappapis.html#worker-event-loop-2
207
207
text: worklet global scopes; url:worklets.html#concept-document-worklet-global-scopes
@@ -7037,17 +7037,20 @@ script.WindowRealmInfo = {
7037
7037
7038
7038
script.DedicatedWorkerRealmInfo = {
7039
7039
script.BaseRealmInfo,
7040
- type: "dedicated-worker"
7040
+ type: "dedicated-worker",
7041
+ owners: [script.Realm]
7041
7042
}
7042
7043
7043
7044
script.SharedWorkerRealmInfo = {
7044
7045
script.BaseRealmInfo,
7045
- type: "shared-worker"
7046
+ type: "shared-worker",
7047
+ owners: [+script.Realm]
7046
7048
}
7047
7049
7048
7050
script.ServiceWorkerRealmInfo = {
7049
7051
script.BaseRealmInfo,
7050
7052
type: "service-worker"
7053
+ owners: [*script.Realm]
7051
7054
}
7052
7055
7053
7056
script.WorkerRealmInfo = {
@@ -7090,6 +7093,25 @@ To <dfn>get the browsing context</dfn> with given |realm|:
7090
7093
7091
7094
1. Return |document|'s [=/browsing context=] .
7092
7095
7096
+ </div>
7097
+ <div algorithm>
7098
+ To <dfn>get the worker's owners</dfn> with given |global object|:
7099
+
7100
+ 1. Assert: |global object| is a {{WorkerGlobalScope}} object.
7101
+
7102
+ 1. Let |owners| be an empty [=/list=] .
7103
+
7104
+ 1. For each |owner| in the |global object|'s associated [=owner set=] :
7105
+
7106
+ 1. Let |owner environment settings| be |owner|'s [=relevant settings object=] .
7107
+
7108
+ 1. Let |owner realm info| be the result of [=get the realm info=] given
7109
+ |owner environment settings|.
7110
+
7111
+ 1. Append |owner realm info|["<code>id</code>"] to |owners|.
7112
+
7113
+ 1. Return |owners|.
7114
+
7093
7115
</div>
7094
7116
7095
7117
<div algorithm>
@@ -7135,21 +7157,26 @@ To <dfn>get the realm info</dfn> given |environment settings|:
7135
7157
7136
7158
<dt> |global object| is a {{DedicatedWorkerGlobalScope}} object
7137
7159
<dd>
7160
+ 1. Let |owners| be the result of [=get the worker's owners=] given |global object|.
7161
+ 1. Assert: |owners| has precisely one item.
7138
7162
1. Let |realm info| be a [=/map=] matching the <code> script.DedicatedWorkerRealmInfo</code> production,
7139
- with the <code> realm</code> field set to |realm id|, and the <code> origin</code> field
7140
- set to |origin|.
7163
+ with the <code> realm</code> field set to |realm id|, the <code> origin</code> field
7164
+ set to |origin|, and the <code> owners </code> field set to |owners| .
7141
7165
7142
7166
<dt> |global object| is a {{SharedWorkerGlobalScope}} object
7143
7167
<dd>
7168
+ 1. Let |owners| be the result of [=get the worker's owners=] given |global object|.
7169
+ 1. Assert: |owners| has at least one item.
7144
7170
1. Let |realm info| be a [=/map=] matching the <code> script.SharedWorkerRealmInfo</code> production,
7145
- with the <code> realm</code> field set to |realm id|, and the <code> origin</code>
7146
- field set to |origin |.
7171
+ with the <code> realm</code> field set to |realm id|, the <code> origin</code> field
7172
+ set to |origin|, and the <code> owners </code> field set to |owners |.
7147
7173
7148
7174
<dt> |global object| is a {{ServiceWorkerGlobalScope}} object
7149
7175
<dd>
7176
+ 1. Let |owners| be the result of [=get the worker's owners=] given |global object|.
7150
7177
1. Let |realm info| be a [=/map=] matching the <code> script.ServiceWorkerRealmInfo</code> production,
7151
- with the <code> realm</code> field set to |realm id|, and the <code> origin</code> field
7152
- set to |origin|.
7178
+ with the <code> realm</code> field set to |realm id|, the <code> origin</code> field
7179
+ set to |origin|, and the <code> owners </code> field set to |owners| .
7153
7180
7154
7181
<dt> |global object| is a {{WorkerGlobalScope}} object
7155
7182
<dd>
0 commit comments