Conversation
This comment has been minimized.
This comment has been minimized.
"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.
8561fc5 to
6c43079
Compare
|
Since nobody has reviewed this yet I'm adding @domenic to the mix. As discussed in whatwg/html#5560 I'll also add some text here that was previously part of sessionStorage/localStorage but is really more broadly applicable to all storage endpoints. |
|
Apologies for not having provided feedback yet. It's on my to-do list. But don't block on me. |
domenic
left a comment
There was a problem hiding this comment.
Seems pretty reasonable. The only thing I feel somewhat strongly about is adding a note explaining why that operation is legacy.
| @@ -254,12 +283,22 @@ given a <a for=map>value</a> when a <a>storage shelf</a> is | |||
| <var>environment</var>, return the result of running <a>obtain a storage shelf</a> with the user | |||
| agent's <a for="user agent">storage shed</a>, <var>environment</var>, and "<code>local</code>". | |||
There was a problem hiding this comment.
It's a little unclear why "local" gets special treatment.
There was a problem hiding this comment.
This is not an exported algorithm. I added this for a number of internal callers.
There was a problem hiding this comment.
In that case it seems like it'd be even nicer to just let the internal callers pass "local" as an argument instead of as part of the algorithm name.
There was a problem hiding this comment.
They would also have to pass in the storage shed. I think it's worth having the abstraction (and this was already approved as part of a prior PR).
There was a problem hiding this comment.
Well, just adding my two cents as a reader that it makes things pretty confusing. Up to you whether to fix it or not.
There was a problem hiding this comment.
Why is this case confusing but other similar cases are not?
There was a problem hiding this comment.
All other cases appear to be symmetrical, with shortcut definitions for both local and session. If there are ones I missed where local is special (but not called out with a note as to why it's special), then I agree those are also confusing.
| <li><p>Set <var>shed</var>[<var>key</var>] to <var>shelf</var>. | ||
| </ol> | ||
| <li><p>If <var>shed</var>[<var>key</var>] does not <a for=map>exist</a>, then set | ||
| <var>shed</var>[<var>key</var>] to the result of running <a>create a storage shelf</a> with |
There was a problem hiding this comment.
"the result of creating a storage shelf" perhaps?
There was a problem hiding this comment.
That would be less locally consistent.
"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.
Preview | Diff