@@ -2460,7 +2460,8 @@ 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-token" data-x-href="https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#token">structured header tokens</dfn></li>
2463
+ <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
+ <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>
2464
2465
</ul>
2465
2466
2466
2467
<p>The following terms are defined in <cite>MIME Sniffing</cite>: <ref spec=MIMESNIFF></p>
@@ -2868,6 +2869,18 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
2868
2869
</dd>
2869
2870
2870
2871
2872
+ <dt>WebAssembly</dt>
2873
+
2874
+ <dd>
2875
+ <p>The following term is defined in <cite>WebAssembly JavaScript Interface</cite>: <ref
2876
+ spec=WASMJS></p>
2877
+
2878
+ <ul class="brief">
2879
+ <li><dfn data-x-href="https://webassembly.github.io/spec/js-api/#module"><code>WebAssembly.Module</code></dfn></li>
2880
+ </ul>
2881
+ </dd>
2882
+
2883
+
2871
2884
<dt>DOM</dt>
2872
2885
2873
2886
<dd>
@@ -76616,7 +76629,7 @@ popup4.close();</code></pre></div>
76616
76629
76617
76630
<li><p>Let <var>agent</var> be the result of <span
76618
76631
data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span> given
76619
- <var>origin</var> and <var>group</var>.</p></li>
76632
+ <var>origin</var>, <var>group</var>, and false .</p></li>
76620
76633
76621
76634
<li>
76622
76635
<p>Let <var>realm execution context</var> be the result of <span>creating a new JavaScript
@@ -77211,6 +77224,15 @@ console.assert(iframeWindow.frameElement === null);
77211
77224
isolated</span> is under discussion in <a href="https://github.com/whatwg/html/pull/4734">issue
77212
77225
#4734</a>.</p>
77213
77226
77227
+ <p>A <span>browsing context group</span> has an associated <dfn>historical agent cluster key
77228
+ map</dfn>, which is a <span data-x="ordered map">map</span> of <span
77229
+ data-x="origin">origins</span> to <span data-x="agent cluster key">agent cluster keys</span>. This
77230
+ map is used to ensure the consistency of the <a href="#origin-isolation">origin isolation</a>
77231
+ feature by recording what agent cluster keys were previously used for a given origin.</p>
77232
+
77233
+ <p class="note">The <span>historical agent cluster key map</span> only ever gains entries over the
77234
+ lifetime of the browsing context group.</p>
77235
+
77214
77236
<p>To <dfn data-x="creating a new browsing context group">create a new browsing context
77215
77237
group</dfn>, run these steps:</p>
77216
77238
@@ -77910,6 +77932,7 @@ interface <dfn data-export="" data-dfn-type="interface">Window</dfn> : <span>Eve
77910
77932
// the user agent
77911
77933
readonly attribute <span>Navigator</span> <span data-x="dom-navigator">navigator</span>; <!-- IE also has window.clientInformation === window.navigator -->
77912
77934
[SecureContext] readonly attribute <span>ApplicationCache</span> <span data-x="dom-applicationCache">applicationCache</span>;
77935
+ [SecureContext] readonly attribute boolean <span data-x="dom-originIsolationRestricted">originIsolationRestricted</span>;
77913
77936
77914
77937
// user prompts
77915
77938
void <span data-x="dom-alert">alert</span>();
@@ -79534,7 +79557,8 @@ interface <dfn>BarProp</dfn> {
79534
79557
<p>Can be set to a value that removes subdomains, to change the <span>origin</span>'s <span
79535
79558
data-x="concept-origin-domain">domain</span> to allow pages on other subdomains of the same
79536
79559
domain (if they do the same thing) to access each other. (Can't be set in sandboxed
79537
- <code>iframe</code>s.)</p>
79560
+ <code>iframe</code>s, and setting it will do nothing if the <code>Document</code> is <a
79561
+ href="#origin-isolation">origin-isolated</a>.)</p>
79538
79562
</dd>
79539
79563
</dl>
79540
79564
@@ -79579,38 +79603,34 @@ interface <dfn>BarProp</dfn> {
79579
79603
<li><p>Return true.</p></li>
79580
79604
</ol>
79581
79605
79582
- <p>The <dfn><code data-x="dom-document-domain">domain</code></dfn> attribute's getter must run
79583
- these steps:</p>
79606
+ <p>The <dfn><code data-x="dom-document-domain">domain</code></dfn> getter steps are:</p>
79584
79607
79585
79608
<ol>
79586
- <li><p>Let <var>effectiveDomain</var> be this <code>Document</code> object's
79587
- <span>origin</span>'s <span data-x="concept-origin-effective-domain">effective domain</span>.
79609
+ <li><p>Let <var>effectiveDomain</var> be <span> this</span>'s <span>origin</span>'s <span
79610
+ data-x="concept-origin-effective-domain">effective domain</span>.
79588
79611
79589
79612
<li><p>If <var>effectiveDomain</var> is null, then return the empty string.</p></li>
79590
79613
79591
79614
<li><p>Return <var>effectiveDomain</var>, <span data-x="host
79592
79615
serializer">serialized</span>.</p></li>
79593
79616
</ol>
79594
79617
79595
- <p>The <code data-x="dom-document-domain">domain</code> attribute's setter must run these
79596
- steps:</p>
79618
+ <p>The <code data-x="dom-document-domain">domain</code> setter steps are:</p>
79597
79619
79598
79620
<ol>
79599
- <li><p>If this <code>Document</code> object's <span data-x="concept-document-bc">browsing
79600
- context</span> is null, then throw a <span>"<code>SecurityError</code>"</span>
79601
- <code>DOMException</code>.</p></li>
79621
+ <li><p>If <span>this</span>'s <span data-x="concept-document-bc">browsing context</span> is null,
79622
+ then throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
79602
79623
79603
- <li><p>If this <code>Document</code> object's <span>active sandboxing flag set</span> has its
79604
- <span>sandboxed <code data-x="dom-document-domain">document.domain</code> browsing context
79605
- flag</span> set, then throw a <span>"<code>SecurityError</code>"</span>
79606
- <code>DOMException</code>.</p></li>
79624
+ <li><p>If <span>this</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
79625
+ <code data-x="dom-document-domain">document.domain</code> browsing context flag</span> set, then
79626
+ throw a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
79607
79627
79608
- <li><p>If this <code>Document</code> object is not <span>allowed to use</span> the "<code
79628
+ <li><p>If <span>this</span> is not <span>allowed to use</span> the "<code
79609
79629
data-x="document-domain-feature">document-domain</code>" feature, then throw a
79610
79630
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
79611
79631
79612
- <li><p>Let <var>effectiveDomain</var> be this <code>Document</code> object's
79613
- <span>origin</span>'s <span data-x="concept-origin-effective-domain">effective domain</span>.
79632
+ <li><p>Let <var>effectiveDomain</var> be <span> this</span>'s <span>origin</span>'s <span
79633
+ data-x="concept-origin-effective-domain">effective domain</span>.
79614
79634
79615
79635
<li><p>If <var>effectiveDomain</var> is null, then throw a
79616
79636
<span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
@@ -79619,7 +79639,18 @@ interface <dfn>BarProp</dfn> {
79619
79639
a registrable domain suffix of and is not equal to</span> <var>effectiveDomain</var>, then throw
79620
79640
a <span>"<code>SecurityError</code>"</span> <code>DOMException</code>.</p></li>
79621
79641
79622
- <li><p>Set this <code>Document</code> object's <span>origin</span>'s <span
79642
+ <li>
79643
+ <p>If the <span>surrounding agent</span>'s <span>agent cluster</span>'s <span>origin-isolation
79644
+ restricted</span> is true, then return.</p>
79645
+
79646
+ <p class="note">In this case the <code>Document</code> is <a
79647
+ href="#origin-isolation">origin-isolated</a>, either explicitly by using the `<code
79648
+ data-x="http-origin-isolation">Origin-Isolation</code>` header, or automatically because a
79649
+ previous same-origin <code>Document</code> in the same <span>browsing context group</span> used
79650
+ the header.</p>
79651
+ </li>
79652
+
79653
+ <li><p>Set <span>this</span>'s <span>origin</span>'s <span
79623
79654
data-x="concept-origin-domain">domain</span> to the result of <span data-x="host
79624
79655
parser">parsing</span> the given value.</p></li>
79625
79656
</ol>
@@ -79637,6 +79668,69 @@ interface <dfn>BarProp</dfn> {
79637
79668
used.</p>
79638
79669
79639
79670
79671
+ <h4>Origin isolation</h4>
79672
+
79673
+ <dl class="domintro">
79674
+ <dt>window . <code subdfn data-x="dom-originIsolationRestricted">originIsolationRestricted</code></dt>
79675
+
79676
+ <dd>
79677
+ <p>Returns true if the origin isolation restrictions are in place for this <code>Window</code>,
79678
+ i.e., if the `<code data-x="http-origin-isolation">Origin-Isolation</code>` header has been used
79679
+ to prevent using <code data-x="dom-document-domain">document.domain</code> or using
79680
+ <code data-x="dom-window-postMessage">postMessage()</code> to send a
79681
+ <code>WebAssembly.Module</code> to a cross-origin <code>Window</code>.</p>
79682
+
79683
+ <p>The returned value generally reflects whether the `<code
79684
+ data-x="http-origin-isolation">Origin-Isolation</code>` HTTP response header was applied while
79685
+ loading the current page. However, even if the header is omitted, the returned value can be
79686
+ true, if the header was applied to a previously-loaded same-origin page in the
79687
+ <code>Window</code>'s <span>browsing context group</span>. Similarly, even if the header was
79688
+ present, the returned value can be false, if the header was omitted on a previously-loaded
79689
+ same-origin page in the <code>Window</code>'s <span>browsing context group</span>.</p>
79690
+ </dd>
79691
+ </dl>
79692
+
79693
+ <p>A <code>Document</code> delivered over a <span data-x="Is environment settings object a secure
79694
+ context?">secure context</span> can opt in to origin isolation, by using the `<code
79695
+ data-x="http-origin-isolation">Origin-Isolation</code>` HTTP response header. This header is a
79696
+ <span data-x="http-structured-header">structured header</span> whose value must be a <span
79697
+ data-x="http-structured-header-boolean">boolean</span>. <ref spec=STRUCTURED-HEADERS></p>
79698
+
79699
+ <p><span w-nodev>Per the processing model in the <span data-x="create-the-document-object">create
79700
+ and initialize a new <code>Document</code> object</span>, values</span><span
79701
+ w-nohtml>Values</span> that are not the <span data-x="http-structured-header-boolean">structured
79702
+ header boolean</span> true value (i.e., `<code data-x="">?1</code>`) will be ignored.</p>
79703
+
79704
+ <p>The consequences of using this header are that <span w-nodev>the resulting
79705
+ <code>Document</code>'s <span>agent cluster key</span> is its <span>origin</span>, instead of the
79706
+ <span data-x="obtain a site">corresponding site</span>. In terms of observable effects, this means
79707
+ that </span>attempting to <a href="#relaxing-the-same-origin-restriction">relax the same-origin
79708
+ restriction</a> using <code data-x="dom-document-domain">document.domain</code> will instead do
79709
+ nothing, and it will not be possible to send <code>WebAssembly.Module</code> objects to
79710
+ cross-origin <code>Document</code>s (even if they are <span>same site</span>). Behind the scenes,
79711
+ this isolation can allow user agents to allocate implementation-specific resources corresponding
79712
+ to <span data-x="agent cluster">agent clusters</span>, such as processes or threads, more
79713
+ efficiently.</p>
79714
+
79715
+ <p>Note that within a <span>browsing context group</span>, the `<code
79716
+ data-x="http-origin-isolation">Origin-Isolation</code>` header can never cause same-origin
79717
+ <code>Document</code> objects to end up in different <span data-x="agent cluster">agent
79718
+ clusters</span>, even if one sends the header and the other doesn't.<span w-nodev> This is
79719
+ prevented by means of the <span>historical agent cluster key map</span>.</span></p>
79720
+
79721
+ <div w-nodev>
79722
+
79723
+ <p>The <dfn><code data-x="dom-originIsolationRestricted">originIsolationRestricted</code></dfn>
79724
+ getter steps are to return the <span>surrounding agent</span>'s <span>agent cluster</span>'s
79725
+ <span>origin-isolation restricted</span> value.</p>
79726
+
79727
+ <p class="note"><code>Document</code>s for which <span>obtain a site</span> returns an
79728
+ <span>origin</span> can be considered unconditionally origin isolated; for them, the header has no
79729
+ effect. In those cases the <code
79730
+ data-x="dom-originIsolationRestricted">originIsolationRestricted</code> getter returns false,
79731
+ since no additional restrictions were imposed by origin isolation.</p>
79732
+
79733
+ </div>
79640
79734
79641
79735
79642
79736
<h3>Sandboxing</h3>
@@ -82705,10 +82799,20 @@ interface <dfn>Location</dfn> { // but see also <a href="#the-location-interface
82705
82799
<p>Otherwise:</p>
82706
82800
82707
82801
<ol>
82802
+ <li><p>Let <var>oiHeader</var> be the result of <span
82803
+ data-x="concept-response-header-list-get-structured-header">getting a structured header</span>
82804
+ given `<code data-x="http-origin-isolation">Origin-Isolation</code>` and "<code
82805
+ data-x="">item</code>" from <var>response</var>'s <span
82806
+ data-x="concept-response-header-list">header list</span>.</p></li>
82807
+
82808
+ <li><p>Let <var>requestsOI</var> be true if <var>oiHeader</var> is not failure,
82809
+ <var>oiHeader</var> is not null, and <var>oiHeader</var>[0] is the <span
82810
+ data-x="http-structured-header-boolean">boolean</span> true.</p></li>
82811
+
82708
82812
<li><p>Let <var>agent</var> be the result of <span
82709
- data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span> given
82710
- <var>origin</var> and <var>browsingContext</var>'s <span data-x="tlbc
82711
- group">group</span >.</p></li>
82813
+ data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent</span>
82814
+ given <var>origin</var>, <var>browsingContext</var>'s <span data-x="tlbc group">group</span>,
82815
+ and <var>requestsOI</var >.</p></li>
82712
82816
82713
82817
<li>
82714
82818
<p>Let <var>realm execution context</var> be the result of <span>creating a new JavaScript
@@ -89099,58 +89203,70 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
89099
89203
89100
89204
<div w-nodev>
89101
89205
89206
+ <p>An <span>agent cluster</span> has an associated <dfn>origin-isolation restricted</dfn> boolean,
89207
+ which is initially false.</p>
89208
+
89102
89209
<hr>
89103
89210
89104
89211
<p>The following defines the allocation of the <span data-x="agent cluster">agent clusters</span>
89105
89212
of <span data-x="similar-origin window agent">similar-origin window agents</span>.</p>
89106
89213
89107
- <p>An <dfn>agent cluster key</dfn> is a <span>site</span>.</p>
89214
+ <p>An <dfn>agent cluster key</dfn> is a <span>site</span> or a <span
89215
+ data-x="concept-origin-tuple">tuple origin</span> whose <span
89216
+ data-x="concept-origin-host">host</span>'s <span>registrable domain</span> is non-null. I.e., an
89217
+ <span>agent cluster key</span> can be either a <span>scheme-and-registrable-domain</span> or any
89218
+ <span>origin</span>.</p>
89108
89219
89109
- <p class="XXX"><a href="https://github.com/whatwg/html/pull/4734">whatwg/html #4734</a> is
89110
- expected to widen <span>agent cluster key</span> (but not <span>site</span>) to encompass all
89111
- <span data-x="concept-origin-tuple">tuple origins</span>.</p>
89220
+ <p id="obtain-browsing-agent-cluster">To <dfn data-x="obtain-similar-origin-window-agent">obtain a
89221
+ similar-origin window agent</dfn>, given an <span>origin</span> <var>origin</var>, a
89222
+ <span>browsing context group</span> <var>group</var>, and a boolean <var>requestsOI</var>, run
89223
+ these steps:</p>
89112
89224
89113
- <p>To <dfn data-x="obtain-agent-cluster-key">obtain an agent cluster key</dfn>, given an origin
89114
- < var>origin </var>, return the result of <span data-x="obtain a site">obtaining a site</span> with
89115
- <var>origin</var>.</p>
89225
+ <ol>
89226
+ <li><p>Let < var>site </var> be the result of <span data-x="obtain a site">obtaining a site</span>
89227
+ given <var>origin</var>.</p></li >
89116
89228
89117
- <p>To <dfn data-x="obtain-similar-origin-window-agent">obtain a similar-origin window agent</dfn>,
89118
- given an <span>origin</span> <var>origin</var> and <span>browsing context group</span>
89119
- <var>group</var>, run these steps:</p>
89229
+ <li id="obtain-agent-cluster-key"><p>Let <var>key</var> be <var>site</var> and let
89230
+ <var>oiRestricted</var> be false.</p></li>
89120
89231
89121
- <ol>
89122
- <li><p>Let <var>clusterKey</var> be the result of <span
89123
- data-x="obtain-agent-cluster-key" data-export="">obtaining an agent cluster key</span> given
89124
- <var>origin</var>.</p></li>
89232
+ <li>
89233
+ <p>If all of the following hold:</p>
89125
89234
89126
- <li><p>Let <var>agentCluster</var> be the result of <span
89127
- data-x="obtain-browsing-agent-cluster">obtaining a browsing context agent cluster</span> with
89128
- <var>group</var> and <var>clusterKey</var>.</p></li>
89235
+ <ul class="brief">
89236
+ <li><var>requestsOI</var> is true</li>
89129
89237
89130
- <li><p>Return the single <span>similar-origin window agent</span> contained in
89131
- <var>agentCluster</var>.</p></li>
89132
- </ol>
89238
+ <li><var>site</var> is not equal to <var>origin</var></li>
89133
89239
89134
- <p>To <dfn data-x="obtain-browsing-agent-cluster">obtain a browsing context agent cluster</dfn>,
89135
- given a <span>browsing context group</span> <var>group</var> and <span>agent cluster key</span>
89136
- <var>key</var>, run these steps:</p>
89240
+ <li><var>group</var>'s <span>historical agent cluster key map</span>[<var>origin</var>] either
89241
+ <span data-x="map exists">does not exist</span> or equals <var>origin</var></li>
89242
+ </ul>
89243
+
89244
+ <p>then set <var>key</var> to <var>origin</var> and set <var>oiRestricted</var> to true.</p>
89245
+ </li>
89137
89246
89138
- <ol>
89139
89247
<li>
89140
89248
<p>If <var>group</var>'s <span>agent cluster map</span>[<var>key</var>] <span data-x="map
89141
- exists">does not exist, then:</span></p>
89249
+ exists">does not exist</span>, then:</p>
89250
+
89142
89251
<ol>
89143
89252
<li><p>Let <var>agentCluster</var> be a new <span>agent cluster</span>.</p></li>
89144
89253
89145
89254
<li><p>Add the result of <span data-x="create an agent">creating an agent</span>, given false,
89146
89255
to <var>agentCluster</var>.</p></li>
89147
89256
89257
+ <li><p>Set <var>agentCluster</var>'s <span>origin-isolation restricted</span> to
89258
+ <var>oiRestricted</var>.</p></li>
89259
+
89148
89260
<li><p>Set <var>group</var>'s <span>agent cluster map</span>[<var>key</var>] to
89149
89261
<var>agentCluster</var>.</p></li>
89262
+
89263
+ <li><p>Set <var>group</var>'s <span>historical agent cluster key map</span>[<var>origin</var>]
89264
+ to <var>key</var>.</p></li>
89150
89265
</ol>
89151
89266
</li>
89152
89267
89153
- <li><p>Return <var>group</var>'s <span>agent cluster map</span>[<var>key</var>].</p></li>
89268
+ <li><p>Return the single <span>similar-origin window agent</span> contained in <var>group</var>'s
89269
+ <span>agent cluster map</span>[<var>key</var>].</p></li>
89154
89270
</ol>
89155
89271
89156
89272
<p class="note">This means that there is only one <span>similar-origin window agent</span> per
@@ -116219,6 +116335,29 @@ interface <dfn>External</dfn> {
116219
116335
</dl>
116220
116336
116221
116337
116338
+ <h3>`<dfn><code data-x="http-origin-isolation">Origin-Isolation</code></dfn>`</h3>
116339
+
116340
+ <p>This section describes a header for registration in the Permanent Message Header Field
116341
+ Registry. <ref spec=RFC3864></p>
116342
+
116343
+ <dl>
116344
+ <dt>Header field name:</dt>
116345
+ <dd>Origin-Isolation</dd>
116346
+ <dt>Applicable protocol:</dt>
116347
+ <dd>http</dd>
116348
+ <dt>Status:</dt>
116349
+ <dd>standard</dd>
116350
+ <dt>Author/Change controller:</dt>
116351
+ <dd>WHATWG</dd>
116352
+ <dt>Specification document(s):</dt>
116353
+ <dd>
116354
+ This document is the relevant specification.
116355
+ </dd>
116356
+ <dt>Related information:</dt>
116357
+ <dd>None.</dd>
116358
+ </dl>
116359
+
116360
+
116222
116361
<h3 id="ping-from">`<dfn><code data-x="http-ping-from">Ping-From</code></dfn>`</h3>
116223
116362
116224
116363
<p>This section describes a header for registration in the Permanent Message Header Field
0 commit comments