Skip to content

Commit d5dc9b7

Browse files
authored
Do not use request's window concept
Per whatwg/fetch#1823, this concept is going away. Instead, use the request's client, which is equivalent for this spec's purposes.
1 parent 8bfc7f5 commit d5dc9b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec.bs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ When {{Worklet/addModule()}} is called for a worklet, it will run [=check if add
323323
- For running operations on a worklet (from a {{Window}}), |environment| is the [=environment settings object=] associated with the {{Window}} that created the worklet, and |origin| is the worklet's [=global scopes=][0]'s [=global object/realm=]'s [=realm/settings object=]'s [=environment settings object/origin=].
324324
- For [[#setter]], |environment| is either the current context (when called from a {{Window}}) or the [=environment settings object=] associated with the {{Window}} that created the worklet (when called from a {{SharedStorageWorkletGlobalScope}}), and |origin| is |environment|'s [=environment settings object/origin=].
325325
- For {{SharedStorage/get()}} invoked from a {{Window}} (which can only succeed in a [=fenced frame=]), |environment| is the current context, and |origin| is |environment|'s [=environment settings object/origin=].
326-
- For [[#ss-fetch-algo]], |environment| is the request's [=request/window=], and |origin| is the request's [=request/current URL=]'s [=url/origin=].
326+
- For [[#ss-fetch-algo]], |environment| is the request's [=request/client=], and |origin| is the request's [=request/current URL=]'s [=url/origin=].
327327
- For [[#ss-fetch-algo]], for {{SharedStorage/createWorklet()}} called with a cross-origin worklet script using the <var ignore=''>dataOrigin</var> option with value `"script-origin"` (which would result in a worklet where [=SharedStorageWorklet/has cross-origin data origin=] is true), and for {{SharedStorageWorklet/selectURL()}} and {{SharedStorageWorklet/run()}} that operate on a worklet where [=SharedStorageWorklet/has cross-origin data origin=] is true, |allowedInOpaqueOriginContext| is true. For other methods, |allowedInOpaqueOriginContext| is false.
328328
</div>
329329

@@ -2233,8 +2233,8 @@ The IDL attribute {{HTMLSharedStorageWritableElementUtils/sharedStorageWritable}
22332233
<div algorithm>
22342234
To <dfn>determine whether a request can currently use shared storage</dfn>, given a [=/request=] |request|, perform the following steps:
22352235

2236-
1. Let |window| to |request|'s [=request/window=].
2237-
1. If |window| is not an [=environment settings object=] whose [=global object=] is a {{Window}}, return false.
2236+
1. Let |window| to |request|'s [=request/client=].
2237+
1. If |window| is not an [=environment settings object=] whose [=environment settings object/global object=] is a {{Window}}, return false.
22382238
1. Let |allowedInOpaqueOriginContext| be true.
22392239
1. If the result of running [=determine whether shared storage is allowed by context=] given |window|, |request|'s [=request/current URL=]'s [=url/origin=], and |allowedInOpaqueOriginContext| is false, return false.
22402240
1. If the result of running [=check if user preference setting allows access to shared storage=] given |window| and |request|'s [=request/current URL=]'s [=url/origin=] is false, return false.
@@ -2258,9 +2258,9 @@ The IDL attribute {{HTMLSharedStorageWritableElementUtils/sharedStorageWritable}
22582258

22592259
1. Let |sharedStorageWritable| the result of running [=get a structured field value=] algorithm given [:Sec-Shared-Storage-Writable:], "`item`", and |request|'s [=request/header list=] as input.
22602260
1. If |sharedStorageWritable| is null, or |sharedStorageWritable| is not a [=structured header/Boolean=], or the value of |sharedStorageWritable| is false, return.
2261-
1. Let |window| to |request|'s [=request/window=].
2262-
1. [=Assert=]: |window| is an [=environment settings object=] whose [=global object=] is a {{Window}}.
2263-
1. Let |sharedStorage| be |window|'s [=global object=]'s {{Window/sharedStorage}}.
2261+
1. Let |window| to |request|'s [=request/client=].
2262+
1. [=Assert=]: |window| is an [=environment settings object=] whose [=environment settings object/global object=] is a {{Window}}.
2263+
1. Let |sharedStorage| be |window|'s [=environment settings object/global object=]'s {{Window/sharedStorage}}.
22642264
1. If |sharedStorage| is null, then return.
22652265
1. Let |list| be |response|'s [=response/header list=].
22662266
1. Let |operationsToParse| be the result of running [=get a structured field value=] algorithm given [:Shared-Storage-Write:], "`list`", and |list| as input.

0 commit comments

Comments
 (0)