@@ -2460,6 +2460,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2460
2460
2461
2461
<ul class="brief">
2462
2462
<li><dfn data-x="http-structured-header" data-x-href="https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html">structured header</dfn></li>
2463
+ <li><dfn data-x="http-structured-header-boolean" data-x-href="https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#boolean">boolean</dfn></li>
2463
2464
<li><dfn data-x="http-structured-header-token" data-x-href="https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#token">token</dfn></li>
2464
2465
<li><dfn data-x="http-structured-header-parameters" data-x-href="https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#param">parameters</dfn></li>
2465
2466
</ul>
@@ -2873,6 +2874,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2873
2874
</dd>
2874
2875
2875
2876
2877
+ <dt>WebAssembly</dt>
2878
+
2879
+ <dd>
2880
+ <p>The following term is defined in <cite>WebAssembly JavaScript Interface</cite>: <ref
2881
+ spec=WASMJS></p>
2882
+
2883
+ <ul class="brief">
2884
+ <li><dfn data-x-href="https://webassembly.github.io/spec/js-api/#module"><code>WebAssembly.Module</code></dfn></li>
2885
+ </ul>
2886
+ </dd>
2887
+
2888
+
2876
2889
<dt>DOM</dt>
2877
2890
2878
2891
<dd>
@@ -76788,7 +76801,7 @@ popup4.close();</code></pre></div>
76788
76801
76789
76802
<li><p>Let <var>agent</var> be the result of <span
76790
76803
data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span> given
76791
- <var>origin</var> and <var>group</var>.</p></li>
76804
+ <var>origin</var>, <var>group</var>, and false .</p></li>
76792
76805
76793
76806
<li>
76794
76807
<p>Let <var>realm execution context</var> be the result of <span>creating a new JavaScript
@@ -77383,6 +77396,15 @@ console.assert(iframeWindow.frameElement === null);
77383
77396
<p>A <span>browsing context group</span> has a <dfn data-x="bcg cross-origin
77384
77397
isolated">cross-origin isolated</dfn> boolean. It is initially false.</p>
77385
77398
77399
+ <p>A <span>browsing context group</span> has an associated <dfn>historical agent cluster key
77400
+ map</dfn>, which is a <span data-x="ordered map">map</span> of <span
77401
+ data-x="origin">origins</span> to <span data-x="agent cluster key">agent cluster keys</span>. This
77402
+ map is used to ensure the consistency of the <a href="#origin-isolation">origin isolation</a>
77403
+ feature by recording what agent cluster keys were previously used for a given origin.</p>
77404
+
77405
+ <p class="note">The <span>historical agent cluster key map</span> only ever gains entries over the
77406
+ lifetime of the browsing context group.</p>
77407
+
77386
77408
<p>To <dfn data-x="creating a new browsing context group">create a new browsing context
77387
77409
group</dfn>, run these steps:</p>
77388
77410
@@ -78090,6 +78112,7 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
78090
78112
// the user agent
78091
78113
readonly attribute <span>Navigator</span> <span data-x="dom-navigator">navigator</span>; <!-- IE also has window.clientInformation === window.navigator -->
78092
78114
[SecureContext] readonly attribute <span>ApplicationCache</span> <span data-x="dom-applicationCache">applicationCache</span>;
78115
+ readonly attribute boolean <span data-x="dom-originIsolated">originIsolated</span>;
78093
78116
78094
78117
// user prompts
78095
78118
void <span data-x="dom-alert">alert</span>();
@@ -79730,8 +79753,8 @@ interface <dfn>BarProp</dfn> {
79730
79753
data-x="concept-document-bc">browsing context</span>, and when the "<code
79731
79754
data-x="document-domain-feature">document-domain</code>" feature is disabled, the setter will
79732
79755
throw a <span>"<code>SecurityError</code>"</span> exception. In cases where <code
79733
- data-x="dom-crossOriginIsolated">crossOriginIsolated</code> returns true, the setter will do
79734
- nothing.</p>
79756
+ data-x="dom-crossOriginIsolated">crossOriginIsolated</code> or <code
79757
+ data-x="dom-originIsolated">originIsolated</code> return true, the setter will do nothing.</p>
79735
79758
</dd>
79736
79759
</dl>
79737
79760
@@ -79792,6 +79815,9 @@ interface <dfn>BarProp</dfn> {
79792
79815
<li><p>If the <span>surrounding agent</span>'s <span>agent cluster</span>'s <span>cross-origin
79793
79816
isolated</span> is true, then return.</p></li>
79794
79817
79818
+ <li><p>If the <span>surrounding agent</span>'s <span>agent cluster</span>'s
79819
+ <span>origin-isolated</span> is true, then return.</p></li>
79820
+
79795
79821
<li><p>Set <var>this</var>'s <span>origin</span>'s <span
79796
79822
data-x="concept-origin-domain">domain</span> to the result of <span data-x="host
79797
79823
parser">parsing</span> the given value.</p></li>
@@ -79840,6 +79866,66 @@ interface <dfn>BarProp</dfn> {
79840
79866
79841
79867
79842
79868
79869
+ <h4>Origin isolation</h4>
79870
+
79871
+ <dl class="domintro">
79872
+ <dt>window . <code subdfn data-x="dom-originIsolated">originIsolated</code></dt>
79873
+
79874
+ <dd>
79875
+ <p>Returns true if this <code>Window</code> is origin-isolated in the manner described in this
79876
+ section.</p>
79877
+ </dd>
79878
+ </dl>
79879
+
79880
+ <p>A <code>Document</code> delivered over a <span>secure context</span> can opt in to origin
79881
+ isolation, by using the `<code data-x="http-origin-isolation">Origin-Isolation</code>` HTTP
79882
+ response header. This header is a <span data-x="http-structured-header">structured header</span>
79883
+ whose value must be a <span data-x="http-structured-header-boolean">boolean</span>. <ref
79884
+ spec=STRUCTURED-HEADERS></p>
79885
+
79886
+ <p><span w-nodev>Per the processing model in the <span data-x="create-the-document-object">create
79887
+ and initialize a new <code>Document</code> object</span>, values</span><span
79888
+ w-nohtml>Values</span> that are not the <span data-x="http-structured-header-boolean">structured
79889
+ header boolean</span> true value (i.e., `<code data-x="">?1</code>`) will be ignored.</p>
79890
+
79891
+ <p>The consequences of using this header are that <span w-nodev>the resulting
79892
+ <code>Document</code>'s <span>agent cluster key</span> is its <span>origin</span>, instead of the
79893
+ <span data-x="obtain a site">corresponding site</span>. In terms of observable effects, this means
79894
+ that </span>attempting to <a href="#relaxing-the-same-origin-restriction">relax the same-origin
79895
+ restriction</a> using <code data-x="dom-document-domain">document.domain</code> will instead do
79896
+ nothing, and it will not be possible to send <code>WebAssembly.Module</code> objects to
79897
+ cross-origin <code>Document</code>s (even if they are <span>same site</span>). Behind the scenes,
79898
+ this isolation can allow user agents to allocate implementation-specific resources corresponding
79899
+ to <span data-x="agent cluster">agent clusters</span>, such as processes or threads, more
79900
+ efficiently.</p>
79901
+
79902
+ <p>Note that within a <span>browsing context group</span>, the `<code
79903
+ data-x="http-origin-isolation">Origin-Isolation</code>` header can never cause same-origin
79904
+ <code>Document</code> objects to end up in different <span data-x="agent cluster">agent
79905
+ clusters</span>, even if one sends the header and the other doesn't.<span w-nodev> This is
79906
+ prevented by means of the <span>historical agent cluster key map</span>.</span></p>
79907
+
79908
+ <p class="note">This means that the <code data-x="dom-originIsolated">originIsolated</code> getter
79909
+ could return false, even if the header is set, if the header was omitted on a previously-loaded
79910
+ same-origin page in the same <span>browsing context group</span>. Similarly, it could return true
79911
+ even when the header is not set.</p>
79912
+
79913
+ <p w-nodev>The <dfn><code data-x="dom-originIsolated">originIsolated</code></dfn> getter steps are
79914
+ to return the <span>surrounding agent</span>'s <span>agent cluster</span>'s
79915
+ <span>origin-isolated</span>.</p>
79916
+
79917
+ <p class="note"><code>Document</code>s for which <span>obtain a site</span> returns an
79918
+ <span>origin</span> can be considered unconditionally origin-isolated; for them the header has no
79919
+ effect.</p>
79920
+
79921
+ <p class="note">Similarly, <code>Document</code>s in a <span>cross-origin isolated</span>
79922
+ <span>agent cluster</span> are automatically origin-isolated, with no need for the additional
79923
+ `<code data-x="http-origin-isolation">Origin-Isolation</code>` header on top of the `<code
79924
+ data-x="http-cross-origin-opener-policy">Cross-Origin-Opener-Policy</code>` and
79925
+ `<code>Cross-Origin-Embedder-Policy</code>` headers used to achieve cross-origin isolation.</p>
79926
+
79927
+
79928
+
79843
79929
<h3>Sandboxing</h3>
79844
79930
79845
79931
<p>A <dfn data-export="">sandboxing flag set</dfn> is a set of zero or more of the following
@@ -83197,10 +83283,24 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
83197
83283
<p>Otherwise:</p>
83198
83284
83199
83285
<ol>
83286
+ <li><p>Let <var>oiHeader</var> be the result of <span
83287
+ data-x="concept-response-header-list-get-structured-header">getting a structured header</span>
83288
+ given `<code data-x="http-origin-isolation">Origin-Isolation</code>` and "<code
83289
+ data-x="">item</code>" from <var>response</var>'s <span
83290
+ data-x="concept-response-header-list">header list</span>.</p></li>
83291
+
83292
+ <li><p>Let <var>requestsOI</var> be true if <var>oiHeader</var> is not failure,
83293
+ <var>oiHeader</var> is not null, and <var>oiHeader</var>[0] is the <span
83294
+ data-x="http-structured-header-boolean">boolean</span> true.</p></li>
83295
+
83296
+ <li><p>If <var>reservedEnvironment</var> is a <span>non-secure context</span>, or
83297
+ <var>response</var>'s <span>HTTPS state</span> is "<code data-x="">deprecated</code>", then
83298
+ set <var>requestsOI</var> to false.</p></li>
83299
+
83200
83300
<li><p>Let <var>agent</var> be the result of <span
83201
- data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span> given
83202
- <var>origin</var> and <var>browsingContext</var>'s <span data-x="tlbc
83203
- group">group</span >.</p></li>
83301
+ data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span>
83302
+ given <var>origin</var>, <var>browsingContext</var>'s <span data-x="tlbc group">group</span>,
83303
+ and <var>requestsOI</var >.</p></li>
83204
83304
83205
83305
<li>
83206
83306
<p>Let <var>realm execution context</var> be the result of <span>creating a new JavaScript
@@ -87073,10 +87173,13 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
87073
87173
ensure that web developers see interoperable behavior with regard to shared memory, even in the
87074
87174
face of varying and changing user agent process models.</p>
87075
87175
87176
+ <div w-nodev>
87177
+
87076
87178
<p>An <span>agent cluster</span> has an associated <dfn>cross-origin isolated</dfn> (a boolean),
87077
87179
which is initially false.</p>
87078
87180
87079
- <div w-nodev>
87181
+ <p>An <span>agent cluster</span> has an associated <dfn>origin-isolated</dfn> (a boolean), which
87182
+ is initially false.</p>
87080
87183
87081
87184
<hr>
87082
87185
@@ -87090,16 +87193,44 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
87090
87193
<span>origin</span>.</p>
87091
87194
87092
87195
<p>To <dfn data-x="obtain-similar-origin-window-agent">obtain a similar-origin window agent</dfn>,
87093
- given an <span>origin</span> <var>origin</var> and <span>browsing context group</span>
87094
- <var>group</var>, run these steps:</p>
87196
+ given an <span>origin</span> <var>origin</var>, a <span>browsing context group</span>
87197
+ <var>group</var>, and a boolean <var>requestsOI</var>, run these steps:</p>
87095
87198
87096
87199
<ol>
87097
- <li><p>Let <var>key</var> be the result of <span data-x="obtain a site">obtaining a
87098
- site</span> with <var>origin</var>.</p></li>
87200
+ <li><p>Let <var>site</var> be the result of <span data-x="obtain a site">obtaining a site</span>
87201
+ with <var>origin</var>.</p></li>
87202
+
87203
+ <li><p>Let <var>key</var> be <var>site</var>.</p></li>
87099
87204
87100
87205
<li><p>If <var>group</var>'s <span data-x="bcg cross-origin isolated">cross-origin
87101
87206
isolated</span> is true, then set <var>key</var> to <var>origin</var>.</p></li>
87102
87207
87208
+ <li>
87209
+ <p>If <var>group</var>'s <span>historical agent cluster key map</span>[<var>origin</var>]
87210
+ <span data-x="map exists">exists</span>, then:</p>
87211
+
87212
+ <ol>
87213
+ <li><p>Assert: if <var>group</var>'s <span data-x="bcg cross-origin isolated">cross-origin
87214
+ isolated</span> is true, then <var>group</var>'s <span>historical agent cluster key
87215
+ map</span>[<var>origin</var>] will be <var>origin</var>, and in that case the next step will be
87216
+ a no-op. I.e., cross-origin isolation always implies origin isolation.</p></li>
87217
+
87218
+ <li><p>Set <var>key</var> to <var>group</var>'s <span>historical agent cluster key
87219
+ map</span>[<var>origin</var>].</p></li>
87220
+ </ol>
87221
+ </li>
87222
+
87223
+ <li>
87224
+ <p>Otherwise:</p>
87225
+
87226
+ <ol>
87227
+ <li><p>If <var>requestsOI</var> is true, then set <var>key</var> to <var>origin</var>.</p></li>
87228
+
87229
+ <li><p>Set <var>group</var>'s <span>historical agent cluster key map</span>[<var>origin</var>]
87230
+ to <var>key</var>.</p></li>
87231
+ </ol>
87232
+ </li>
87233
+
87103
87234
<li>
87104
87235
<p>If <var>group</var>'s <span>agent cluster map</span>[<var>key</var>] <span data-x="map
87105
87236
exists">does not exist</span>, then:</p>
@@ -87110,6 +87241,9 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
87110
87241
<li><p>Set <var>agentCluster</var>'s <span>cross-origin isolated</span> to <var>group</var>'s
87111
87242
<span data-x="bcg cross-origin isolated">cross-origin isolated</span>.</p></li>
87112
87243
87244
+ <li><p>Set <var>agentCluster</var>'s <span>origin-isolated</span> to true if <var>key</var>
87245
+ equals <var>origin</var>; otherwise false.</p></li>
87246
+
87113
87247
<li><p>Add the result of <span data-x="create an agent">creating an agent</span>, given false,
87114
87248
to <var>agentCluster</var>.</p></li>
87115
87249
@@ -87139,8 +87273,22 @@ interface <dfn>ApplicationCache</dfn> : <span>EventTarget</span> {
87139
87273
<ol>
87140
87274
<li><p>Let <var>agentCluster</var> be null.
87141
87275
87142
- <li><p>If <var>isTopLevel</var> is true, then set <var>agentCluster</var> to a new <span>agent
87143
- cluster</span>.</p></li>
87276
+ <li>
87277
+ <p>If <var>isTopLevel</var> is true, then:</p>
87278
+
87279
+ <ol>
87280
+ <li><p>Set <var>agentCluster</var> to a new <span>agent cluster</span>.</p></li>
87281
+
87282
+ <li>
87283
+ <p>Set <var>agentCluster</var>'s <span>origin-isolated</span> to true.</p>
87284
+
87285
+ <p class="note">These workers/worklets can be considered to be origin-isolated. However, this
87286
+ is not exposed through any APIs (in the way that <code
87287
+ data-x="dom-originIsolated">originIsolated</code> exposes the origin-isolation state for
87288
+ windows).</p>
87289
+ </li>
87290
+ </ol>
87291
+ </li>
87144
87292
87145
87293
<li>
87146
87294
<p>Otherwise:</p>
@@ -116947,6 +117095,29 @@ interface <dfn>External</dfn> {
116947
117095
</dl>
116948
117096
116949
117097
117098
+ <h3>`<dfn><code data-x="http-origin-isolation">Origin-Isolation</code></dfn>`</h3>
117099
+
117100
+ <p>This section describes a header for registration in the Permanent Message Header Field
117101
+ Registry. <ref spec=RFC3864></p>
117102
+
117103
+ <dl>
117104
+ <dt>Header field name:</dt>
117105
+ <dd>Origin-Isolation</dd>
117106
+ <dt>Applicable protocol:</dt>
117107
+ <dd>http</dd>
117108
+ <dt>Status:</dt>
117109
+ <dd>standard</dd>
117110
+ <dt>Author/Change controller:</dt>
117111
+ <dd>WHATWG</dd>
117112
+ <dt>Specification document(s):</dt>
117113
+ <dd>
117114
+ This document is the relevant specification.
117115
+ </dd>
117116
+ <dt>Related information:</dt>
117117
+ <dd>None.</dd>
117118
+ </dl>
117119
+
117120
+
116950
117121
<h3 id="ping-from">`<dfn><code data-x="http-ping-from">Ping-From</code></dfn>`</h3>
116951
117122
116952
117123
<p>This section describes a header for registration in the Permanent Message Header Field
0 commit comments