Re: [whatwg/storage] Add top-level site to storage key. (#127) (PR #144)

@annevk commented on this pull request.



> @@ -228,7 +228,15 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
  <a>environment settings object</a>; otherwise <var>environment</var>'s
  <a for=environment>creation URL</a>'s <a for=url>origin</a>.
 
- <li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
+ <li><p>Let <var>top-level origin</var> be <var>environment</var>'s
+ <a for=environment>top-level origin</a>.
+
+ <li><p>If <var>top-level origin</var> is null, then set it to <var>origin</var>.
+
+ <li><p>Let <var>top-level site</var> be the result of of running <a>obtain a site</a>
+ given <var>top-level origin</var>.
+
+ <li><p>Return a <a>tuple</a> consisting of <var>origin</var> and <var>top-level site</var>.

```suggestion
 <li><p>Return (<var>origin</var>, <var>top-level site</var>).
```

> @@ -228,7 +228,15 @@ anticipated that some APIs will be applicable to both <a>storage types</a> going
  <a>environment settings object</a>; otherwise <var>environment</var>'s
  <a for=environment>creation URL</a>'s <a for=url>origin</a>.
 
- <li><p>Return a <a>tuple</a> consisting of <var>origin</var>.
+ <li><p>Let <var>top-level origin</var> be <var>environment</var>'s

I prefer to keep variable names without spaces: _topLevelOrigin_.

> @@ -239,6 +247,9 @@ steps:
  <li><p>If <var>A</var>'s <a for="storage key">origin</a> is not <a>same origin</a> with
  <var>B</var>'s <a for="storage key">origin</a>, then return false.
 
+ <li><p>If <var>A</var>'s <a for="storage key">top-level site</a> is not equal to

Oh interesting. I guess this is the first time we have to define "same site" for two sites. Shall we add that to HTML?

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

Message ID: <whatwg/storage/pull/144/review/994729520@github.com>

Received on Friday, 3 June 2022 10:20:18 UTC