@@ -28451,8 +28451,9 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28451
28451
data-x="attr-iframe-sandbox-allow-popups-to-escape-sandbox">allow-popups-to-escape-sandbox</code>,
28452
28452
<code data-x="attr-iframe-sandbox-allow-presentation">allow-presentation</code>, <code
28453
28453
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code>, <code
28454
- data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, and <code
28455
- data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>.</p>
28454
+ data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, <code
28455
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>, and <code
28456
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>.</p>
28456
28457
28457
28458
<p>When the attribute is set, the content is treated as being from a unique <span>origin</span>,
28458
28459
forms, scripts, and various potentially annoying APIs are disabled, links are prevented from
@@ -28461,7 +28462,11 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28461
28462
the content to be treated as being from its real origin instead of forcing it into a unique
28462
28463
origin; the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>
28463
28464
keyword allows the content to <span>navigate</span> its <span>top-level browsing context</span>;
28464
- and the <code data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28465
+ the <code
28466
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28467
+ keyword behaves similarly but only allows such <span data-x="navigate">navigation</span> when
28468
+ <span>triggered by user activation</span>; and the <code
28469
+ data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28465
28470
data-x="attr-iframe-sandbox-allow-modals">allow-modals</code>, <code
28466
28471
data-x="attr-iframe-sandbox-allow-orientation-lock">allow-orientation-lock</code>, <code
28467
28472
data-x="attr-iframe-sandbox-allow-pointer-lock">allow-pointer-lock</code>, <code
@@ -28474,6 +28479,13 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28474
28479
context">auxiliary browsing contexts</span> respectively. <ref spec=POINTERLOCK>
28475
28480
<ref spec=SCREENORIENTATION> <ref spec=PRESENTATION></p>
28476
28481
28482
+ <p>The <code
28483
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> and <code
28484
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28485
+ keywords must not both be specified, as doing so is redundant; only <code
28486
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> will have an effect
28487
+ in such non-conformant markup.</p>
28488
+
28477
28489
<p class="warning">Setting both the <code
28478
28490
data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code> and <code
28479
28491
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code> keywords together when the
@@ -77265,11 +77277,23 @@ console.assert(iframeWindow.frameElement === null);
77265
77277
document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed navigation
77266
77278
browsing context flag</span> set, then abort these steps negatively.</p></li>
77267
77279
77268
- <li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77269
- <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>, and
77270
- <var>A</var>'s <span>active document</span>'s <span>active sandboxing flag set</span> has its
77271
- <span>sandboxed top-level navigation browsing context flag</span> set, then abort these steps
77272
- negatively.</p></li>
77280
+ <li>
77281
+ <p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77282
+ <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>,
77283
+ then:</p>
77284
+
77285
+ <ol>
77286
+ <li><p>If this algorithm is <span>triggered by user activation</span> and <var>A</var>'s
77287
+ <span>active document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
77288
+ top-level navigation with user activation browsing context flag</span> set, then abort these
77289
+ steps negatively.</p></li>
77290
+
77291
+ <li><p>If this algorithm is not <span>triggered by user activation</span> and <var>A</var>'s
77292
+ <span>active document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
77293
+ top-level navigation without user activation browsing context flag</span> set, then abort these
77294
+ steps negatively.</p></li>
77295
+ </ol>
77296
+ </li>
77273
77297
77274
77298
<li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is
77275
77299
neither <var>A</var> nor one of the <span data-x="ancestor browsing context">ancestor
@@ -79600,7 +79624,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79600
79624
<span data-x="auxiliary browsing context">auxiliary browsing contexts</span> (which are protected
79601
79625
by the <span>sandboxed auxiliary navigation browsing context flag</span> defined next), and the
79602
79626
<span>top-level browsing context</span> (which is protected by the <span>sandboxed top-level
79603
- navigation browsing context flag</span> defined below).</p>
79627
+ navigation without user activation browsing context flag</span> and <span>sandboxed top-level
79628
+ navigation with user activation browsing context flag</span> defined below).</p>
79604
79629
79605
79630
<p>If the <span>sandboxed auxiliary navigation browsing context flag</span> is not set, then in
79606
79631
certain cases the restrictions nonetheless allow popups (new <span data-x="top-level browsing
@@ -79624,19 +79649,39 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79624
79649
</dd>
79625
79650
79626
79651
79627
- <dt>The <dfn data-export="">sandboxed top-level navigation browsing context flag</dfn></dt>
79652
+ <dt>The <dfn data-export="">sandboxed top-level navigation without user activation browsing
79653
+ context flag</dfn></dt>
79654
+
79655
+ <dd>
79656
+
79657
+ <p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79658
+ browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79659
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that are
79660
+ <em>not</em> <span>triggered by user activation</span>.</p>
79661
+
79662
+ <p>When the <span>sandboxed top-level navigation without user activation browsing context
79663
+ flag</span> is <em>not</em> set, content can navigate its <span>top-level browsing
79664
+ context</span>, but other <span data-x="browsing context">browsing contexts</span> are still
79665
+ protected by the <span>sandboxed navigation browsing context flag</span> and possibly
79666
+ the <span>sandboxed auxiliary navigation browsing context flag</span>.</p>
79667
+
79668
+ </dd>
79669
+
79670
+
79671
+ <dt>The <dfn data-export="">sandboxed top-level navigation with user activation browsing context
79672
+ flag</dfn></dt>
79628
79673
79629
79674
<dd>
79630
79675
79631
79676
<p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79632
79677
browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79633
- <span>top-level browsing context</span></a>.</p>
79678
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that
79679
+ <em>are</em> <span>triggered by user activation</span>.</p>
79634
79680
79635
- <p>When the <span>sandboxed top-level navigation browsing context flag</span> is <em>not</em>
79636
- set, content can navigate its <span>top-level browsing context</span>, but other <span
79637
- data-x="browsing context">browsing contexts</span> are still protected by the <span>sandboxed
79638
- navigation browsing context flag</span> and possibly the <span>sandboxed auxiliary navigation
79639
- browsing context flag</span>.</p>
79681
+ <p>As with the <span>sandboxed top-level navigation without user activation browsing context
79682
+ flag</span>, this flag only affects the <span>top-level browsing context</span>; if it is not
79683
+ set, other <span data-x="browsing context">browsing contexts</span> might still be protected by
79684
+ other flags.</p>
79640
79685
79641
79686
</dd>
79642
79687
@@ -79796,8 +79841,21 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79796
79841
79797
79842
<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>
79798
79843
79799
- <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>
79800
- keyword.</p></li>
79844
+ <li><p>The <span>sandboxed top-level navigation without user activation browsing context flag</span>, unless
79845
+ <var>tokens</var> contains the <dfn><code
79846
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code></dfn> keyword.</p></li>
79847
+
79848
+ <li>
79849
+ <p>The <span>sandboxed top-level navigation with user activation browsing context flag</span>, unless
79850
+ <var>tokens</var> contains either the <dfn><code
79851
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code></dfn>
79852
+ keyword or the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> keyword.</p>
79853
+
79854
+ <p class="note">This means that if the <code
79855
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> is present, the <code
79856
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
79857
+ keyword will have no effect. For this reason, specifying both is a document conformance error.</p>
79858
+ </li>
79801
79859
79802
79860
<li><p>The <span>sandboxed plugins browsing context flag</span>.</p></li>
79803
79861
0 commit comments