Re: [whatwg/storage] Add 'obtain a storage key for non-storage purposes' (PR #132)

@recvfrom commented on this pull request.



> @@ -203,6 +203,16 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
 <p class=XXX>This is expected to change; see
 <a href="https://privacycg.github.io/storage-partitioning/">Client-Side Storage Partitioning</a>.
 
+<p>To <dfn export>obtain a storage key for non-storage purposes</dfn>, given an <a>environment
+settings object</a> <var>environment</var>, run these steps:
+
+<ol>
+ <li><p>Let <var>key</var> be <var>environment</var>'s
+ <a for="environment settings object">origin</a>.

The latest commit turns storage key into a tuple (with only one item for now) and uses its `origin` for the opaque origin comparison. Per the [tuple docs](https://infra.spec.whatwg.org/#tuples) we can avoid using the indexing syntax if we name the tuple items, so I went with that approach.

Also, regarding https://github.com/whatwg/html/pull/7567#discussion_r801790301, I'll plan to add a storage key comparison function in a separate PR unless you all prefer that it be a part of this one.

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

Message ID: <whatwg/storage/pull/132/review/876918414@github.com>

Received on Wednesday, 9 February 2022 04:46:36 UTC