Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 104 additions & 38 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -56881,6 +56881,9 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
<p>If <var>target</var> is not null:</p>

<ol>
<li><p>Let <var>focusSetterDocument</var> be <var>element</var>'s <span>node
document</span>.</p></li>

<li><p>Let <var>command</var> be <var>element</var>'s <code
data-x="attr-button-command">command</code> attribute.</p></li>

Expand Down Expand Up @@ -56934,7 +56937,8 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
<var>validity</var> be false.</p></li>

<li><p>If <var>validity</var> is true, then run the <span data-x="show popover">show popover
algorithm</span> given <var>target</var>, false, and <var>element</var>.</p></li>
algorithm</span> given <var>target</var>, false, <var>element</var>, and
<var>focusSetterDocument</var>.</p></li>

<li>
<p>Otherwise:</p>
Expand All @@ -56961,14 +56965,15 @@ interface <dfn interface>HTMLButtonElement</dfn> : <span>HTMLElement</span> {
<var>validity</var> be false.</p></li>

<li><p>If <var>validity</var> is true, then run the <span data-x="show popover">show popover
algorithm</span> given <var>target</var>, false, and <var>element</var>.</p></li>
algorithm</span> given <var>target</var>, false, <var>element</var>, and
<var>focusSetterDocument</var>.</p></li>
</ol>
</li>

<li><p>Otherwise, if this standard defines <span>command steps</span> for
<var>target</var>'s <span data-x="concept-element-local-name">local name</span>, then run the
corresponding <span>command steps</span> given <var>target</var>, <var>element</var>,
and <var>command</var>.</p></li>
<var>command</var>, and <var>focusSetterDocument</var>.</p></li>
</ol>
</li>

Expand Down Expand Up @@ -57409,7 +57414,8 @@ interface <dfn interface>HTMLSelectElement</dfn> : <span>HTMLElement</span> {
data-x="dom-MouseEvent-button">button</code> attribute is not 0, then return.</p></li>

<li><p>Run the <span>show popover</span> algorithm given <var>select</var>'s <span>select
popover</span>, false, and <var>select</var>.</p></li>
popover</span>, false, <var>select</var>, and <var>select</var>'s <span>node
document</span>.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -66413,6 +66419,10 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>If <span>this</span> has an <code data-x="attr-dialog-open">open</code> attribute, then
throw an <span>"<code>InvalidStateError</code>"</span> <code>DOMException</code>.</p></li>

<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>If the result of <span data-x="concept-event-fire">firing an event</span> named <code
data-x="event-beforetoggle">beforetoggle</code>, using <code>ToggleEvent</code>, with the <code
data-x="dom-Event-cancelable">cancelable</code> attribute initialized to true, the <code
Expand Down Expand Up @@ -66441,14 +66451,23 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>Run <span>hide popovers until</span> given <var>document</var>, <var>hideUntil</var>,
false, and true.</p></li>

<li><p>Run the <span>dialog focusing steps</span> given <span>this</span>.</p></li>
<li><p>Run the <span>dialog focusing steps</span> given <span>this</span> and
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

<div algorithm>
<p>The <dfn method for="HTMLDialogElement"><code
data-x="dom-dialog-showModal">showModal()</code></dfn> method steps are to <span>show a modal
dialog</span> given <span>this</span> and null.</p>
data-x="dom-dialog-showModal">showModal()</code></dfn> method steps are:</p>

<ol>
<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p><span>Show a modal dialog</span> given <span>this</span>, null, and
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

<div algorithm>
Expand Down Expand Up @@ -66625,8 +66644,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
</div>

<div algorithm>
<p>To <dfn>show a modal dialog</dfn> given a <code>dialog</code> element <var>subject</var> and an
<code>Element</code> or null <var>source</var>:</p>
<p>To <dfn>show a modal dialog</dfn> given a <code>dialog</code> element <var>subject</var>, an
<code>Element</code> or null <var>source</var>, and a <code>Document</code>
<var>focusSetterDocument</var>:</p>

<ol>
<li><p>If <var>subject</var> has an <code data-x="attr-dialog-open">open</code> attribute and
Expand Down Expand Up @@ -66700,7 +66720,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>Run <span>hide popovers until</span> given <var>document</var>, <var>hideUntil</var>,
false, and true.</p></li>

<li><p>Run the <span>dialog focusing steps</span> given <var>subject</var>.</p></li>
<li><p>Run the <span>dialog focusing steps</span> given <var>subject</var> and
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -66758,8 +66779,9 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {

<div algorithm>
<p>The <span>command steps</span> for <code>dialog</code> elements, given an element
<var>element</var>, an element <var>source</var>, and a <code
data-x="attr-button-command">command</code> attribute <var>command</var>, are:</p>
<var>element</var>, an element <var>source</var>, a <code
data-x="attr-button-command">command</code> attribute <var>command</var>, and a
<code>Document</code> <var>focusSetterDocument</var>, are:</p>

<ol>
<li><p>If <var>element</var> is in the <span
Expand All @@ -66781,7 +66803,8 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
<li><p>If <var>command</var> is the <span
data-x="attr-button-command-show-modal-state">Show Modal</span> state and <var>element</var> does
not have an <code data-x="attr-dialog-open">open</code> attribute, then
<span>show a modal dialog</span> given <var>element</var> and <var>source</var>.</p></li>
<span>show a modal dialog</span> given <var>element</var>, <var>source</var>, and
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -66973,12 +66996,15 @@ interface <dfn interface>HTMLDialogElement</dfn> : <span>HTMLElement</span> {
</div>

<div algorithm>
<p>The <dfn>dialog focusing steps</dfn>, given a <code>dialog</code> element <var>subject</var>,
are as follows:</p>
<p>The <dfn>dialog focusing steps</dfn>, given a <code>dialog</code> element <var>subject</var>
and a <code>Document</code> <var>focusSetterDocument</var>, are as follows:</p>

<ol>
<li><p>If the <span>allow focus steps</span> given <var>subject</var>'s <span>node
document</span> return false, then return.</p></li>
<li><p>If <var>subject</var>'s <span>node document</span> is not <span>fully active</span>, then
return.</p></li>

<li><p>If the <span>allow focus steps</span> given <var>focusSetterDocument</var> return false,
then return.</p></li>

<li><p>Let <var>control</var> be null.</p></li>

Expand Down Expand Up @@ -87402,8 +87428,15 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {

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

<li><p>If the <span>allow focus steps</span> given <var>current</var>'s <span
data-x="nav-document">active document</span> return false, then return.</p></li>
<li><p>If <var>current</var>'s <span data-x="nav-document">active document</span> is not
<span>fully active</span>, then return.</p></li>

<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>If the <span>allow focus steps</span> given <var>focusSetterDocument</var> return false,
then return.</p></li>

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

Expand All @@ -87430,8 +87463,15 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
data-x="dom-focus">focus(<var>options</var>)</code></dfn> method steps are:</p>

<ol>
<li><p>If the <span>allow focus steps</span> given <span>this</span>'s <span>node document</span>
return false, then return.</p></li>
<li><p>If <span>this</span>'s <span>node document</span> is not <span>fully active</span>, then
return.</p></li>

<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>If the <span>allow focus steps</span> given <var>focusSetterDocument</var> return false,
then return.</p></li>

<li><p>Run the <span>focusing steps</span> for <span>this</span>.</p></li>

Expand Down Expand Up @@ -87469,17 +87509,21 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {

<div algorithm>
<p>The <dfn export>allow focus steps</dfn>, given a <code>Document</code> object
<var>target</var>, are:</p>
<var>focusSetterDocument</var>, are:</p>

<ol>
<li><p>If <var>target</var> is <span>allowed to use</span> the "<code
<li><p>If <var>focusSetterDocument</var> is not <span>fully active</span>, then return
false.</p></li>

<li><p>If <var>focusSetterDocument</var> is <span>allowed to use</span> the "<code
data-x="focus-without-user-activation-feature">focus-without-user-activation</code>" feature,
then return true.</p></li>

<li><p>If <var>target</var>'s <span>relevant global object</span> has <span>transient
activation</span>, then return true.</p></li>
<li><p>If <var>focusSetterDocument</var>'s <span>relevant global object</span> has
<span>transient activation</span>, then return true.</p></li>

<li><p>Return false.</p></li>
<li><p>Return the result of running the <span>has focus steps</span> given
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

Expand Down Expand Up @@ -87638,6 +87682,9 @@ dictionary <dfn dictionary>CommandEventInit</dfn> : <span>EventInit</span> {
<li><p><span data-x="list remove">Remove</span> <var>element</var> from
<var>candidates</var>.</p></li>

<li><p>If the <span>allow focus steps</span> given <var>doc</var> return false, then
<span>continue</span>.</p></li>

<li><p>Let <var>inclusiveAncestorDocuments</var> be a <span>list</span> consisting of the
<span data-x="nav-document">active document</span> of <var>doc</var>'s <span>inclusive
ancestor navigables</span>.</p></li>
Expand Down Expand Up @@ -92218,19 +92265,24 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
data-x="dom-showPopover">showPopover(<var>options</var>)</code></dfn> method steps are:</p>

<ol>
<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>Let <var>source</var> be <var>options</var>["<code
data-x="dom-ShowPopoverOptions-source">source</code>"] if it <span data-x="map
exists">exists</span>; otherwise, null.</p></li>

<li><p>Run <span>show popover</span> given <span>this</span>, true, and
<var>source</var>.</p></li>
<li><p>Run <span>show popover</span> given <span>this</span>, true, <var>source</var>, and
<var>focusSetterDocument</var>.</p></li>
</ol>
</div>

<div algorithm>
<p>To <dfn>show popover</dfn>, given an <span data-x="HTML elements">HTML element</span>
<var>element</var>, a boolean <var>throwExceptions</var>, and an <span data-x="HTML elements">HTML
element</span> or null <var>source</var>:</p>
<var>element</var>, a boolean <var>throwExceptions</var>, an <span data-x="HTML elements">HTML
element</span> or null <var>source</var>, and a <code>Document</code>
<var>focusSetterDocument</var>:</p>

<ol>
<li><p>Let <var>document</var> be <var>element</var>'s <span>node document</span>.</p></li>
Expand Down Expand Up @@ -92471,7 +92523,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<li><p>Set <var>element</var>'s <span>implicit anchor element</span> to
<var>source</var>.</p></li>

<li><p>Run the <span>popover focusing steps</span> given <var>element</var>.</p></li>
<li><p>Run the <span>popover focusing steps</span> given <var>element</var> and
<var>focusSetterDocument</var>.</p></li>

<li><p>If <var>shouldRestoreFocus</var> is true and <var>element</var>'s <code
data-x="attr-popover">popover</code> attribute is not in the <span
Expand Down Expand Up @@ -92756,8 +92809,18 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
the <span>hide popover algorithm</span> given <span>this</span>, true, true, true, and
null.</p></li>

<li><p>Otherwise, if <var>force</var> is null or true, then run <span>show popover</span> given
<span>this</span>, true, and <var>source</var>.</p></li>
<li>
<p>Otherwise, if <var>force</var> is null or true:</p>

<ol>
<li><p>Let <var>focusSetterDocument</var> be the <span
data-x="concept-incumbent-global">incumbent global object</span>'s <span
data-x="concept-document-window">associated <code>Document</code></span>.</p></li>

<li><p>Run <span>show popover</span> given <span>this</span>, true, <var>source</var>, and
<var>focusSetterDocument</var>.</p></li>
</ol>
</li>

<li>
<p>Otherwise:</p>
Expand Down Expand Up @@ -93002,14 +93065,15 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {

<div algorithm>
<p>To perform the <dfn>popover focusing steps</dfn> for an <span data-x="HTML elements">HTML
element</span> <var>subject</var>:</p>
element</span> <var>subject</var> and a <code>Document</code>
<var>focusSetterDocument</var>:</p>

<ol>
<li><p>If the <span>allow focus steps</span> given <var>subject</var>'s <span>node
document</span> return false, then return.</p></li>
<li><p>If the <span>allow focus steps</span> given <var>focusSetterDocument</var> return false,
then return.</p></li>

<li><p>If <var>subject</var> is a <code>dialog</code> element, then run the <span>dialog focusing
steps</span> given <var>subject</var> and return.</p></li>
steps</span> given <var>subject</var> and <var>focusSetterDocument</var>, and return.</p></li>

<li><p>If <var>subject</var> has the <code data-x="attr-fe-autofocus">autofocus</code>
attribute, then let <var>control</var> be <var>subject</var>.
Expand Down Expand Up @@ -93292,7 +93356,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<var>validity</var> be false.</p></li>

<li><p>If <var>validity</var> is true, then run <span>show popover</span> given
<var>popover</var>, false, and <var>node</var>.</p></li>
<var>popover</var>, false, <var>node</var>, and <var>node</var>'s <span>node
document</span>.</p></li>
</ol>
</li>
</ol>
Expand Down Expand Up @@ -162133,6 +162198,7 @@ INSERT INTERFACES HERE
Félix Sanz,
Felix Sasaki,
Fernando Altomare Serboncini,
Fernando Fiori,
Forbes Lindesay,
Francesco Schwarz,
Francis Brosnan Blazquez,
Expand Down