@@ -28486,8 +28486,9 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28486
28486
data-x="attr-iframe-sandbox-allow-popups-to-escape-sandbox">allow-popups-to-escape-sandbox</code>,
28487
28487
<code data-x="attr-iframe-sandbox-allow-presentation">allow-presentation</code>, <code
28488
28488
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code>, <code
28489
- data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, and <code
28490
- data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>.</p>
28489
+ data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code>, <code
28490
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>, and <code
28491
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>.</p>
28491
28492
28492
28493
<p>When the attribute is set, the content is treated as being from a unique <span>origin</span>,
28493
28494
forms, scripts, and various potentially annoying APIs are disabled, links are prevented from
@@ -28496,7 +28497,11 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28496
28497
the content to be treated as being from its real origin instead of forcing it into a unique
28497
28498
origin; the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code>
28498
28499
keyword allows the content to <span>navigate</span> its <span>top-level browsing context</span>;
28499
- and the <code data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28500
+ the <code
28501
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28502
+ keyword behaves similarly but only allows such <span data-x="navigate">navigation</span> when
28503
+ <span>triggered by user activation</span>; and the <code
28504
+ data-x="attr-iframe-sandbox-allow-forms">allow-forms</code>, <code
28500
28505
data-x="attr-iframe-sandbox-allow-modals">allow-modals</code>, <code
28501
28506
data-x="attr-iframe-sandbox-allow-orientation-lock">allow-orientation-lock</code>, <code
28502
28507
data-x="attr-iframe-sandbox-allow-pointer-lock">allow-pointer-lock</code>, <code
@@ -28509,6 +28514,13 @@ interface <dfn>HTMLIFrameElement</dfn> : <span>HTMLElement</span> {
28509
28514
context">auxiliary browsing contexts</span> respectively. <ref spec=POINTERLOCK>
28510
28515
<ref spec=SCREENORIENTATION> <ref spec=PRESENTATION></p>
28511
28516
28517
+ <p>The <code
28518
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> and <code
28519
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
28520
+ keywords must not both be specified, as doing so is redundant; only <code
28521
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> will have an effect
28522
+ in such non-conformant markup.</p>
28523
+
28512
28524
<p class="warning">Setting both the <code
28513
28525
data-x="attr-iframe-sandbox-allow-scripts">allow-scripts</code> and <code
28514
28526
data-x="attr-iframe-sandbox-allow-same-origin">allow-same-origin</code> keywords together when the
@@ -77090,11 +77102,23 @@ console.assert(iframeWindow.frameElement === null);
77090
77102
document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed navigation
77091
77103
browsing context flag</span> set, then abort these steps negatively.</p></li>
77092
77104
77093
- <li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77094
- <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>, and
77095
- <var>A</var>'s <span>active document</span>'s <span>active sandboxing flag set</span> has its
77096
- <span>sandboxed top-level navigation browsing context flag</span> set, then abort these steps
77097
- negatively.</p></li>
77105
+ <li>
77106
+ <p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is one of the
77107
+ <span data-x="ancestor browsing context">ancestor browsing contexts</span> of <var>A</var>,
77108
+ then:</p>
77109
+
77110
+ <ol>
77111
+ <li><p>If this algorithm is <span>triggered by user activation</span> and <var>A</var>'s
77112
+ <span>active document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
77113
+ top-level navigation with user activation browsing context flag</span> set, then abort these
77114
+ steps negatively.</p></li>
77115
+
77116
+ <li><p>If this algorithm is not <span>triggered by user activation</span> and <var>A</var>'s
77117
+ <span>active document</span>'s <span>active sandboxing flag set</span> has its <span>sandboxed
77118
+ top-level navigation without user activation browsing context flag</span> set, then abort these
77119
+ steps negatively.</p></li>
77120
+ </ol>
77121
+ </li>
77098
77122
77099
77123
<li><p>Otherwise, if <var>B</var> is a <span>top-level browsing context</span>, and is
77100
77124
neither <var>A</var> nor one of the <span data-x="ancestor browsing context">ancestor
@@ -79414,7 +79438,8 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79414
79438
<span data-x="auxiliary browsing context">auxiliary browsing contexts</span> (which are protected
79415
79439
by the <span>sandboxed auxiliary navigation browsing context flag</span> defined next), and the
79416
79440
<span>top-level browsing context</span> (which is protected by the <span>sandboxed top-level
79417
- navigation browsing context flag</span> defined below).</p>
79441
+ navigation without user activation browsing context flag</span> and <span>sandboxed top-level
79442
+ navigation with user activation browsing context flag</span> defined below).</p>
79418
79443
79419
79444
<p>If the <span>sandboxed auxiliary navigation browsing context flag</span> is not set, then in
79420
79445
certain cases the restrictions nonetheless allow popups (new <span data-x="top-level browsing
@@ -79438,19 +79463,39 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79438
79463
</dd>
79439
79464
79440
79465
79441
- <dt>The <dfn data-export="">sandboxed top-level navigation browsing context flag</dfn></dt>
79466
+ <dt>The <dfn data-export="">sandboxed top-level navigation without user activation browsing
79467
+ context flag</dfn></dt>
79468
+
79469
+ <dd>
79470
+
79471
+ <p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79472
+ browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79473
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that are
79474
+ <em>not</em> <span>triggered by user activation</span>.</p>
79475
+
79476
+ <p>When the <span>sandboxed top-level navigation without user activation browsing context
79477
+ flag</span> is <em>not</em> set, content can navigate its <span>top-level browsing
79478
+ context</span>, but other <span data-x="browsing context">browsing contexts</span> are still
79479
+ protected by the <span>sandboxed navigation browsing context flag</span> and possibly
79480
+ the <span>sandboxed auxiliary navigation browsing context flag</span>.</p>
79481
+
79482
+ </dd>
79483
+
79484
+
79485
+ <dt>The <dfn data-export="">sandboxed top-level navigation with user activation browsing context
79486
+ flag</dfn></dt>
79442
79487
79443
79488
<dd>
79444
79489
79445
79490
<p>This flag <a href="#sandboxLinks">prevents content from navigating their <span>top-level
79446
79491
browsing context</span></a> and <a href="#sandboxClose">prevents content from closing their
79447
- <span>top-level browsing context</span></a>.</p>
79492
+ <span>top-level browsing context</span></a>. It is consulted only from algorithms that
79493
+ <em>are</em> <span>triggered by user activation</span>.</p>
79448
79494
79449
- <p>When the <span>sandboxed top-level navigation browsing context flag</span> is <em>not</em>
79450
- set, content can navigate its <span>top-level browsing context</span>, but other <span
79451
- data-x="browsing context">browsing contexts</span> are still protected by the <span>sandboxed
79452
- navigation browsing context flag</span> and possibly the <span>sandboxed auxiliary navigation
79453
- browsing context flag</span>.</p>
79495
+ <p>As with the <span>sandboxed top-level navigation without user activation browsing context
79496
+ flag</span>, this flag only affects the <span>top-level browsing context</span>; if it is not
79497
+ set, other <span data-x="browsing context">browsing contexts</span> might still be protected by
79498
+ other flags.</p>
79454
79499
79455
79500
</dd>
79456
79501
@@ -79610,8 +79655,21 @@ callback <dfn>FrameRequestCallback</dfn> = void (<span>DOMHighResTimeStamp</span
79610
79655
79611
79656
<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>
79612
79657
79613
- <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>
79614
- keyword.</p></li>
79658
+ <li><p>The <span>sandboxed top-level navigation without user activation browsing context flag</span>, unless
79659
+ <var>tokens</var> contains the <dfn><code
79660
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code></dfn> keyword.</p></li>
79661
+
79662
+ <li>
79663
+ <p>The <span>sandboxed top-level navigation with user activation browsing context flag</span>, unless
79664
+ <var>tokens</var> contains either the <dfn><code
79665
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code></dfn>
79666
+ keyword or the <code data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> keyword.</p>
79667
+
79668
+ <p class="note">This means that if the <code
79669
+ data-x="attr-iframe-sandbox-allow-top-navigation">allow-top-navigation</code> is present, the <code
79670
+ data-x="attr-iframe-sandbox-allow-top-navigation-by-user-activation">allow-top-navigation-by-user-activation</code>
79671
+ keyword will have no effect. For this reason, specifying both is a document conformance error.</p>
79672
+ </li>
79615
79673
79616
79674
<li><p>The <span>sandboxed plugins browsing context flag</span>.</p></li>
79617
79675
0 commit comments