Re: [whatwg/storage] Clarify storage infrastructure (#86)

I think this now defines sufficient infrastructure to define storage and session storage APIs. It does not:

1. Define a replacement operation that is needed for #4 and `Clear-Site-Data`.
2. Change the keying away from origin (though it does acknowledge and isolate the problem to a single point).

A storage API would do something like:

> Let _map_ be the result of running obtain a storage bucket area map with _environment_, "storage", and "localStorage".

It can then use that _map_ as it pleases, for instance in response to API calls.

(Writing this down I realize we should probably expose a separate "obtain a storage bucket area map" and a "obtain a session storage bucket area map" so APIs do not have to pass a storage type.)

It should also provide a solid basis for any kind of multiple storage bucket API though in the absence of one looks a bit complicated.

If this looks agreeable I would like, in order:

1. Merge this.
2. Work on defining the replacement operation and get that merged.
3. Work on a PR for localStorage/sessionStorage to make use of this.
4. Continue work on storage partitioning for improvements to the storage key.

I could wait with 1 until 2 is further along, but I would greatly appreciate detailed feedback on this PR first.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/storage/pull/86#issuecomment-622951540

Received on Saturday, 2 May 2020 13:11:52 UTC