Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define obtain a storage key #92

Closed
annevk opened this issue May 19, 2020 · 0 comments · Fixed by #93
Closed

Define obtain a storage key #92

annevk opened this issue May 19, 2020 · 0 comments · Fixed by #93

Comments

@annevk
Copy link
Member

annevk commented May 19, 2020

My intuition from reading w3c/IndexedDB#334 and seeing whatwg/html#3054 is that we should have an "obtain a storage key" as standalone algorithm as well. It takes an environment and returns a storage key or failure.

Initially it would encompass the first three steps of https://storage.spec.whatwg.org/#obtain-a-storage-shelf, namely:

  1. Let key be environment’s origin.
  2. If key is an opaque origin, then return failure.
  3. If the user has disabled storage, then return failure.
  4. Return key.

@whatwg/storage agreed?

annevk added a commit that referenced this issue May 20, 2020
This can be used by APIs that share keying logic with storage, such as BroadcastChannel and shared workers.

Also add and export create a storage shelf so HTML can more cleanly clone sessionStorage data as part of whatwg/html#5560.

Closes #92.
annevk added a commit that referenced this issue May 20, 2020
"legacy-clone a browsing session storage shed" can be used by HTML to define creation of auxiliary browsing contexts, as part of whatwg/html#5560.

"obtain a storage key" can be used by APIs that share keying logic with storage, such as BroadcastChannel and shared workers. See whatwg/html#3054. It's potentially also useful for Indexed DB as discussed in w3c/IndexedDB#334.

Closes #92.
@annevk annevk closed this as completed in #93 Jun 5, 2020
annevk added a commit that referenced this issue Jun 5, 2020
"legacy-clone a browsing session storage shed" can be used by HTML to define creation of auxiliary browsing contexts, as part of whatwg/html#5560.

"obtain a storage key" can be used by APIs that share keying logic with storage, such as BroadcastChannel and shared workers. See whatwg/html#3054. It's potentially also useful for Indexed DB as discussed in w3c/IndexedDB#334.

Also helps a bit with #95 by reorganizing and adding some more detail to how a user agent is supposed to manage storage.

Closes #92.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

1 participant