Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arichiv committed Mar 19, 2024
1 parent 6d9d7da commit e2bf181
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -200,50 +200,50 @@ Issue(19): Clarify client-side storage mechanism changes in more detail.

<h4 id="dom-storage">[=Web storage=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export attribute for=StorageAccessHandle><code>sessionStorage</code></dfn> getter must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export attribute for=StorageAccessHandle><code>sessionStorage</code></dfn> getter must run these steps:

1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/sessionStorage}} is `false`:
1. Throw an "{{InvalidStateError}}" {{DOMException}}.
1. Return the invocation of [=html/sessionStorage=] on |docForSAA|.
1. Return the invocation of [=html/sessionStorage=].

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export attribute for=StorageAccessHandle><code>localStorage</code></dfn> getter must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export attribute for=StorageAccessHandle><code>localStorage</code></dfn> getter must run these steps:

1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/localStorage}} is `false`:
1. Throw an "{{InvalidStateError}}" {{DOMException}}.
1. Return the invocation of [=html/localStorage=] on |docForSAA|.
1. Return the invocation of [=html/localStorage=].

<h4 id="indexed-db">[=Indexed Database API=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export attribute for=StorageAccessHandle><code>indexedDB</code></dfn> getter must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export attribute for=StorageAccessHandle><code>indexedDB</code></dfn> getter must run these steps:

1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/indexedDB}} is `false`:
1. Throw an "{{InvalidStateError}}" {{DOMException}}.
1. Return the invocation of {{WindowOrWorkerGlobalScope/indexedDB}} on |docForSAA|.
1. Return the invocation of {{WindowOrWorkerGlobalScope/indexedDB}} on |doc|.

<h4 id="web-locks">[=Web Locks API=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export attribute for=StorageAccessHandle><code>locks</code></dfn> getter must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export attribute for=StorageAccessHandle><code>locks</code></dfn> getter must run these steps:

1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/locks}} is `false`:
1. Throw an "{{InvalidStateError}}" {{DOMException}}.
1. Return the invocation of [=/locks=] on |docForSAA|.{{Navigator}}.
1. Return the invocation of [=/locks=] on {{Navigator}}.

<h4 id="cache-storage">[=Cache Storage=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export attribute for=StorageAccessHandle><code>caches</code></dfn> getter must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export attribute for=StorageAccessHandle><code>caches</code></dfn> getter must run these steps:

1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/caches}} is `false`:
1. Throw an "{{InvalidStateError}}" {{DOMException}}.
1. Return the invocation of [=/caches=] on |docForSAA|.
1. Return the invocation of [=/caches=].

<h4 id="file-system">[=File System=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export method for=StorageAccessHandle><code>getDirectory()</code></dfn> method must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export method for=StorageAccessHandle><code>getDirectory()</code></dfn> method must run these steps:

1. Let |p| be [=a new promise=].
1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/getDirectory}} is `false`:
1. [=/Reject=] |p| with an "{{InvalidStateError}}" {{DOMException}}.
1. Let |directoryPromise| be the result of running {{StorageManager/getDirectory()}} on |docForSAA|.{{Navigator}}.{{NavigatorStorage/storage}}.
1. Let |directoryPromise| be the result of running {{StorageManager/getDirectory()}} on {{Navigator}}.{{NavigatorStorage/storage}}.
1. If |directoryPromise| [=/rejects=] with `reason` |r|:
1. [=/Reject=] |p| with |r|.
1. Else if |directoryPromise| [=/resolves=] with {{FileSystemDirectoryHandle}} |f|:
Expand All @@ -252,12 +252,12 @@ When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |ty

<h4 id="storage-manager">[=Storage Manager=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Document}} |docForSAA|, the <dfn export method for=StorageAccessHandle><code>estimate()</code></dfn> method must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, the <dfn export method for=StorageAccessHandle><code>estimate()</code></dfn> method must run these steps:

1. Let |p| be [=a new promise=].
1. If |types|.{{StorageAccessTypes/all}} is `false` and |types|.{{StorageAccessTypes/estimate}} is `false`:
1. [=/Reject=] |p| with an "{{InvalidStateError}}" {{DOMException}}.
1. Let |estimatePromise| be the result of running {{StorageManager/estimate()}} on |docForSAA|.{{Navigator}}.{{NavigatorStorage/storage}}.
1. Let |estimatePromise| be the result of running {{StorageManager/estimate()}} on {{Navigator}}.{{NavigatorStorage/storage}}.
1. If |estimatePromise| [=/rejects=] with `reason` |r|:
1. [=/Reject=] |p| with |r|.
1. Else if |estimatePromise| [=/resolves=] with {{StorageEstimate}} |e|:
Expand All @@ -266,25 +266,25 @@ When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |ty

<h4 id="file-api">[=File API=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, {{Document}} |docForSAA|, and {{Blob}} or {{MediaSource}} |obj|, the <dfn export method for=StorageAccessHandle><code>createObjectURL(obj)</code></dfn> method must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{Blob}} or {{MediaSource}} |obj|, the <dfn export method for=StorageAccessHandle><code>createObjectURL(obj)</code></dfn> method must run these steps:

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 |docForSAA|.{{URL}} with |obj|.
1. Return the invocation of [=/createObjectURL=] on {{URL}} with |obj|.

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, {{Document}} |docForSAA|, and {{DOMString}} |url|, the <dfn export method for=StorageAccessHandle><code>revokeObjectURL(url)</code></dfn> method must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{DOMString}} |url|, the <dfn export method for=StorageAccessHandle><code>revokeObjectURL(url)</code></dfn> 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 |docForSAA|.{{URL}} with |url|.
1. Return the invocation of [=/revokeObjectURL=] on {{URL}} with |url|.

<h4 id="broadcast-channel">[=Broadcast Channel=]</h4>

When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types|, {{Document}} |docForSAA|, and {{DOMString}} |name|, the <dfn export method for=StorageAccessHandle><code>BroadcastChannel(name)</code></dfn> method must run these steps:
When invoked on {{StorageAccessHandle}} |handle| with {{StorageAccessTypes}} |types| and {{DOMString}} |name|, the <dfn export method for=StorageAccessHandle><code>BroadcastChannel(name)</code></dfn> method must run these steps:

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=] on |docForSAA| with |name|.
1. Return the invocation of [=new BroadcastChannel=] with |name|.

<h4 id="shared-worker">Shared Worker</h4>

Expand Down

0 comments on commit e2bf181

Please sign in to comment.