Skip to content

Commit b3a49bc

Browse files
authored
Replace origin with storage key for BroadcastChannel partitioning
This updates the BroadcastChannel specification to have storage keys be used instead of origins when determining which browsing contexts should be able to have BroadcastChannel messages sent and received from them. Today, a storage key only consists of an origin, but it will likely soon include the top-level origin as well. Only using origin enables certain forms of cross-site tracking. For more details, see https://privacycg.github.io/storage-partitioning/. This helps with #5803, but does not yet close it since storage keys do not yet contain more than just the origin.
1 parent 5b01d31 commit b3a49bc

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

source

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4126,6 +4126,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
41264126
<ul class="brief">
41274127
<li><dfn data-x-href="https://storage.spec.whatwg.org/#obtain-a-local-storage-bottle-map">obtain a local storage bottle map</dfn></li>
41284128
<li><dfn data-x-href="https://storage.spec.whatwg.org/#obtain-a-session-storage-bottle-map">obtain a session storage bottle map</dfn></li>
4129+
<li><dfn data-x-href="https://storage.spec.whatwg.org/#obtain-a-storage-key-for-non-storage-purposes">obtain a storage key for non-storage purposes</dfn></li>
4130+
<li><dfn data-x-href="https://storage.spec.whatwg.org/#storage-key-equal">storage key equal</dfn></li>
41294131
<li><dfn data-x-href="https://storage.spec.whatwg.org/#storage-proxy-map">storage proxy map</dfn></li>
41304132
<li><dfn data-x-href="https://storage.spec.whatwg.org/#legacy-clone-a-browsing-session-storage-shed">legacy-clone a browsing session storage shed</dfn></li>
41314133
</ul>
@@ -102499,16 +102501,20 @@ interface <dfn interface>BroadcastChannel</dfn> : <span>EventTarget</span> {
102499102501
<li><p>Let <var>sourceOrigin</var> be <span>this</span>'s <span>relevant settings object</span>'s
102500102502
<span data-x="concept-settings-object-origin">origin</span>.</p></li>
102501102503

102504+
<li><p>Let <var>sourceStorageKey</var> be the result of running <span>obtain a storage key for
102505+
non-storage purposes</span> with <span>this</span>'s <span>relevant settings
102506+
object</span>.</p></li>
102507+
102502102508
<li>
102503102509
<p>Let <var>destinations</var> be a list of <code>BroadcastChannel</code> objects that
102504102510
match the following criteria:</p>
102505102511

102506102512
<ul>
102507102513
<li><p>They are <span>eligible for messaging</span>.</p></li>
102508102514

102509-
<li><p>Their <span>relevant settings object</span>'s <span
102510-
data-x="concept-settings-object-origin">origin</span> is <span>same origin</span> with
102511-
<var>sourceOrigin</var>.</p></li>
102515+
<li><p>The result of running <span>obtain a storage key for non-storage purposes</span> with
102516+
their <span>relevant settings object</span> <span data-x="storage key equal">equals</span>
102517+
<var>sourceStorageKey</var>.</p></li>
102512102518

102513102519
<li><p>Their <span>channel name</span> <span>is</span> <span>this</span>'s <span>channel
102514102520
name</span>.</p></li>

0 commit comments

Comments
 (0)