@@ -28453,8 +28453,9 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28453
28453
data-x="attr-iframe-sandbox-allow-popups-to-escape-sandbox">allow-popups-to-escape-sandbox</code>,
28454
28454
<code data-x="attr-iframe-sandbox-allow-presentation">allow-presentation</code>, <code
28455
28455
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code>, <code
28456
- data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, and <code
28457
- data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>.</p>
28456
+ data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, <code
28457
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>, and <code
28458
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>.</p>
28458
28459
28459
28460
<p>When the attribute is set, the content is treated as being from a unique <span>origin</span>,
28460
28461
forms, scripts, and various potentially annoying APIs are disabled, links are prevented from
@@ -28463,7 +28464,11 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28463
28464
the content to be treated as being from its real origin instead of forcing it into a unique
28464
28465
origin; the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>
28465
28466
keyword allows the content to <span>navigate</span> its <span>top-level browsing context</span>;
28466
- and the <code data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28467
+ the <code
28468
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28469
+ keyword behaves similarly but only allows such <span data-x="navigate">navigation</span> when
28470
+ <span>triggered by user activation</span>; and the <code
28471
+ data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28467
28472
data-x="attr-iframe-sandbox-allow-modals">allow-modals</code>, <code
28468
28473
data-x="attr-iframe-sandbox-allow-orientation-lock">allow-orientation-lock</code>, <code
28469
28474
data-x="attr-iframe-sandbox-allow-pointer-lock">allow-pointer-lock</code>, <code
@@ -28476,6 +28481,13 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28476
28481
context">auxiliary browsing contexts</span> respectively. <ref spec=POINTERLOCK>
28477
28482
<ref spec=SCREENORIENTATION> <ref spec=PRESENTATION></p>
28478
28483
28484
+ <p>The <code
28485
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> and <code
28486
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28487
+ keywords must not both be specified, as doing so is redundant; only <code
28488
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> will have an effect
28489
+ in such non-conformant markup.</p>
28490
+
28479
28491
<p class="warning">Setting both the <code
28480
28492
data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code> and <code
28481
28493
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code> keywords together when the
@@ -77280,11 +77292,23 @@ console.assert(iframeWindow.frameElement === null);
77280
77292
document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed navigation
77281
77293
browsing context flag</span> set, then abort these steps negatively.</p></li>
77282
77294
77283
- <li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77284
- <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>, and
77285
- <var>A</var>'s <span>active document</span>'s <span>active sandboxing flag set</span> has its
77286
- <span>sandboxed top-level navigation browsing context flag</span> set, then abort these steps
77287
- negatively.</p></li>
77295
+ <li>
77296
+ <p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77297
+ <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>,
77298
+ then:</p>
77299
+
77300
+ <ol>
77301
+ <li><p>If this algorithm is <span>triggered by user activation</span> and <var>A</var>'s
77302
+ <span>active document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
77303
+ top-level navigation with user activation browsing context flag</span> set, then abort these
77304
+ steps negatively.</p></li>
77305
+
77306
+ <li><p>Otherwise, If this algorithm is not <span>triggered by user activation</span> and
77307
+ <var>A</var>'s <span>active document</span>'s <span>active sandboxing flag set</span> has its
77308
+ <span>sandboxed top-level navigation without user activation browsing context flag</span> set,
77309
+ then abort these steps negatively.</p></li>
77310
+ </ol>
77311
+ </li>
77288
77312
77289
77313
<li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is
77290
77314
neither <var>A</var> nor one of the <span data-x="ancestor browsing context">ancestor
@@ -79615,7 +79639,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79615
79639
<span data-x="auxiliary browsing context">auxiliary browsing contexts</span> (which are protected
79616
79640
by the <span>sandboxed auxiliary navigation browsing context flag</span> defined next), and the
79617
79641
<span>top-level browsing context</span> (which is protected by the <span>sandboxed top-level
79618
- navigation browsing context flag</span> defined below).</p>
79642
+ navigation without user activation browsing context flag</span> and <span>sandboxed top-level
79643
+ navigation with user activation browsing context flag</span> defined below).</p>
79619
79644
79620
79645
<p>If the <span>sandboxed auxiliary navigation browsing context flag</span> is not set, then in
79621
79646
certain cases the restrictions nonetheless allow popups (new <span data-x="top-level browsing
@@ -79639,19 +79664,39 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79639
79664
</dd>
79640
79665
79641
79666
79642
- <dt>The <dfn data-export="">sandboxed top-level navigation browsing context flag</dfn></dt>
79667
+ <dt>The <dfn data-export="">sandboxed top-level navigation without user activation browsing
79668
+ context flag</dfn></dt>
79669
+
79670
+ <dd>
79671
+
79672
+ <p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79673
+ browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79674
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that are
79675
+ <em>not</em> <span>triggered by user activation</span>.</p>
79676
+
79677
+ <p>When the <span>sandboxed top-level navigation without user activation browsing context
79678
+ flag</span> is <em>not</em> set, content can navigate its <span>top-level browsing
79679
+ context</span>, but other <span data-x="browsing context">browsing contexts</span> are still
79680
+ protected by the <span>sandboxed navigation browsing context flag</span> and possibly
79681
+ the <span>sandboxed auxiliary navigation browsing context flag</span>.</p>
79682
+
79683
+ </dd>
79684
+
79685
+
79686
+ <dt>The <dfn data-export="">sandboxed top-level navigation with user activation browsing context
79687
+ flag</dfn></dt>
79643
79688
79644
79689
<dd>
79645
79690
79646
79691
<p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79647
79692
browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79648
- <span>top-level browsing context</span></a>.</p>
79693
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that
79694
+ <em>are</em> <span>triggered by user activation</span>.</p>
79649
79695
79650
- <p>When the <span>sandboxed top-level navigation browsing context flag</span> is <em>not</em>
79651
- set, content can navigate its <span>top-level browsing context</span>, but other <span
79652
- data-x="browsing context">browsing contexts</span> are still protected by the <span>sandboxed
79653
- navigation browsing context flag</span> and possibly the <span>sandboxed auxiliary navigation
79654
- browsing context flag</span>.</p>
79696
+ <p>As with the <span>sandboxed top-level navigation without user activation browsing context
79697
+ flag</span>, this flag only affects the <span>top-level browsing context</span>; if it is not
79698
+ set, other <span data-x="browsing context">browsing contexts</span> might still be protected by
79699
+ other flags.</p>
79655
79700
79656
79701
</dd>
79657
79702
@@ -79811,8 +79856,21 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79811
79856
79812
79857
<li><p>The <span>sandboxed auxiliary navigation browsing context flag</span>, unless <var>tokens</var> contains the <dfn><code data-x="attr-iframe-sandbox-allow-popups">allow-popups</code></dfn> keyword.</p></li>
79813
79858
79814
- <li><p>The <span>sandboxed top-level navigation browsing context flag</span>, unless <var>tokens</var> contains the <dfn><code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code></dfn>
79815
- keyword.</p></li>
79859
+ <li><p>The <span>sandboxed top-level navigation without user activation browsing context flag</span>, unless
79860
+ <var>tokens</var> contains the <dfn><code
79861
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code></dfn> keyword.</p></li>
79862
+
79863
+ <li>
79864
+ <p>The <span>sandboxed top-level navigation with user activation browsing context flag</span>, unless
79865
+ <var>tokens</var> contains either the <dfn><code
79866
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code></dfn>
79867
+ keyword or the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> keyword.</p>
79868
+
79869
+ <p class="note">This means that if the <code
79870
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> is present, the <code
79871
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
79872
+ keyword will have no effect. For this reason, specifying both is a document conformance error.</p>
79873
+ </li>
79816
79874
79817
79875
<li><p>The <span>sandboxed plugins browsing context flag</span>.</p></li>
79818
79876
0 commit comments