From b0a73c2913824e4845cb0449d0d8c50776c5f323 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Thu, 21 Mar 2024 07:01:54 -0400 Subject: [PATCH 1/2] Remove invocation Let's just say we `return the result of running x`. That seems closer to convention. closes #23 --- spec.bs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/spec.bs b/spec.bs index fd53820..c9f8d2e 100644 --- a/spec.bs +++ b/spec.bs @@ -167,7 +167,7 @@ A {{StorageAccessHandle}} object has an associated {{StorageAccessTypes}} hasUnpartitionedCookieAccess() method must run these steps: -1. Return the invocation of {{Document/hasStorageAccess()}} on |doc|. +1. Return the result of running of {{Document/hasStorageAccess()}} on |doc|. Note: Now that {{Document/requestStorageAccess(types)}} can be used to request [=unpartitioned data=] with or without specifically requesting cookies, it must be made clear that {{Document/hasStorageAccess()}} only returns true if [=first-party-site context=] cookies are accessable to the current document. @@ -215,13 +215,13 @@ The sessionStoragelocalStorage getter steps are: 1. If |this|'s |types|.{{StorageAccessTypes/all}} is `false` and |this|'s |types|.{{StorageAccessTypes/localStorage}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=html/localStorage=]. +1. Return the result of running [=html/localStorage=].

[=Indexed Database API=]

@@ -229,7 +229,7 @@ The indexedDB g 1. If |this|'s |types|.{{StorageAccessTypes/all}} is `false` and |this|'s |types|.{{StorageAccessTypes/indexedDB}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of {{WindowOrWorkerGlobalScope/indexedDB}}. +1. Return the result of running {{WindowOrWorkerGlobalScope/indexedDB}}.

[=Web Locks API=]

@@ -237,7 +237,7 @@ The locks gette 1. If |this|'s |types|.{{StorageAccessTypes/all}} is `false` and |this|'s |types|.{{StorageAccessTypes/locks}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=/locks=] on {{Navigator}}. +1. Return the result of running [=/locks=] on {{Navigator}}.

[=Cache Storage=]

@@ -245,7 +245,7 @@ The caches gett 1. If |this|'s |types|.{{StorageAccessTypes/all}} is `false` and |this|'s |types|.{{StorageAccessTypes/caches}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=/caches=]. +1. Return the result of running [=/caches=].

[=File System=]

@@ -281,13 +281,13 @@ When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |ty 1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/createObjectURL}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=/createObjectURL=] on {{URL}} with |obj|. +1. Return the result of running [=/createObjectURL=] on {{URL}} with |obj|. When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{DOMString}} |url|, the revokeObjectURL(url) method must run these steps: 1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/revokeObjectURL}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=/revokeObjectURL=] on {{URL}} with |url|. +1. Return the result of running [=/revokeObjectURL=] on {{URL}} with |url|.

[=Broadcast Channel=]

@@ -295,7 +295,7 @@ When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |ty 1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/BroadcastChannel}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=new BroadcastChannel=] with |name|. +1. Return the result of running [=new BroadcastChannel=] with |name|.

[=Shared Workers=]

@@ -339,7 +339,7 @@ When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |ty 1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/SharedWorker}} is `false`: 1. Throw an "{{InvalidStateError}}" {{DOMException}}. -1. Return the invocation of [=new SharedWorker=] with |scriptURL| and |options|. +1. Return the result of running [=new SharedWorker=] with |scriptURL| and |options|.

Security & Privacy considerations

From 310cef4a967850a81e9a77216307ac9b0938779b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Thu, 21 Mar 2024 07:02:24 -0400 Subject: [PATCH 2/2] Update spec.bs --- spec.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index c9f8d2e..276c4dd 100644 --- a/spec.bs +++ b/spec.bs @@ -167,7 +167,7 @@ A {{StorageAccessHandle}} object has an associated {{StorageAccessTypes}} hasUnpartitionedCookieAccess() method must run these steps: -1. Return the result of running of {{Document/hasStorageAccess()}} on |doc|. +1. Return the result of running {{Document/hasStorageAccess()}} on |doc|. Note: Now that {{Document/requestStorageAccess(types)}} can be used to request [=unpartitioned data=] with or without specifically requesting cookies, it must be made clear that {{Document/hasStorageAccess()}} only returns true if [=first-party-site context=] cookies are accessable to the current document.