Skip to content

Commit

Permalink
Spec change for focus-without-user-activation
Browse files Browse the repository at this point in the history
Cherry-picked from whatwg#4585
  • Loading branch information
siliu1 committed Oct 1, 2024
1 parent 65ef915 commit ce00f26
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4876,6 +4876,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
data-x="">cross-origin-isolated</code></dfn>", which has a <span
data-x="concept-default-allowlist">default allowlist</span> of <code
data-x="">'self'</code>.</li>
<li>"<dfn data-x="focus-without-user-activation-feature"><code
data-x="">focus-without-user-activation</code></dfn>", which has a <span
data-x="concept-default-allowlist">default allowlist</span> of <code data-x="">*</code>.</li>
</ul>


Expand Down Expand Up @@ -80506,6 +80509,11 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {

<li><p>If <var>current</var> is null, then return.</p></li>

<li><p>If this algorithm is not <span>triggered by user activation</span> and
<var>current</var>'s <span>active document</span> is not <span>allowed to use</span> the "<code
data-x="focus-without-user-activation-feature">focus-without-user-activation</code>" feature,
then return.</p></li>

<li><p>Run the <span>focusing steps</span> with <var>current</var>.</p></li>

<li><p>If <var>current</var> is a <span>top-level traversable</span>, user agents are encouraged
Expand All @@ -80525,6 +80533,11 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
method on elements, when invoked, must run the following steps:</p>

<ol>
<li><p>If this algorithm is not <span>triggered by user activation</span> and the element's
<span>node document</span> is not <span>allowed to use</span> the "<code
data-x="focus-without-user-activation-feature">focus-without-user-activation</code>" feature,
then return.</p></li>

<li><p>If the element is marked as <i data-x="locked for focus">locked for focus</i>, then return.</p></li>

<li><p>Mark the element as <dfn>locked for focus</dfn>.</p></li>
Expand Down Expand Up @@ -80631,6 +80644,11 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
<li><p>If <var>target</var>'s <span>active sandboxing flag set</span> has the
<span>sandboxed automatic features browsing context flag</span>, then return.</p></li>

<li><p>If this algorithm is not <span>triggered by user activation</span> and the
<var>target</var> is not <span>allowed to use</span> the "<code
data-x="focus-without-user-activation-feature">focus-without-user-activation</code>" feature,
then return.</p></li>

<li><p><span data-x="list iterate">For each</span> <var>ancestorNavigable</var> of
<var>target</var>'s <span>ancestor navigables</span>: if <var>ancestorNavigable</var>'s <span
data-x="nav-document">active document</span>'s <span
Expand Down Expand Up @@ -144368,6 +144386,7 @@ INSERT INTERFACES HERE
Edward Welbourne,
Edward Z. Yang,
Ehsan Akhgari,
Ehsan Karamad,
Eira Monstad,
Eitan Adler,
Eli Friedman,
Expand Down

0 comments on commit ce00f26

Please sign in to comment.