Skip to content

Commit

Permalink
Make it “details toggle task tracker” & “popover toggle task tracker”
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Aug 24, 2023
1 parent 55c6d83 commit 47ac7d1
Showing 1 changed file with 19 additions and 73 deletions.
92 changes: 19 additions & 73 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -59788,7 +59788,8 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
exists, user agents can still provide this ability through some other user interface
affordance.</p>

<p>Every <code>details</code> element has a <span>toggle task tracker</span>, initially null.</p>
<p>Every <code>details</code> element has a <dfn>details toggle task tracker</dfn>, which is a
<span>toggle task tracker</span> or null, initially null</p>

<p>Whenever the <code data-x="attr-details-open">open</code> attribute is added to or removed from
a <code>details</code> element, the user agent must run the following steps, which are known as
Expand All @@ -59813,16 +59814,16 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {

<ol>
<li>
<p>If <var>element</var>'s <span>toggle task tracker</span> is not null, then:</p>
<p>If <var>element</var>'s <span>details toggle task tracker</span> is not null, then:</p>

<ol>
<li><p>Set <var>oldState</var> to <var>element</var>'s <span>toggle task tracker</span>'s
<span data-x="toggle-task-old-state">old state</span>.</p></li>
<li><p>Set <var>oldState</var> to <var>element</var>'s <span>details toggle task
tracker</span>'s <span data-x="toggle-task-old-state">old state</span>.</p></li>

<li><p>Remove <var>element</var>'s <span>toggle task tracker</span>'s <span
<li><p>Remove <var>element</var>'s <span>details toggle task tracker</span>'s <span
data-x="toggle-task-task">task</span> from its <span>task queue</span>.</p></li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to null.</p></li>
<li><p>Set <var>element</var>'s <span>details toggle task tracker</span> to null.</p></li>
</ol>
</li>

Expand All @@ -59837,11 +59838,11 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
<var>oldState</var> and the <code data-x="dom-ToggleEvent-newState">newState</code> attribute
initialized to <var>newState</var>.</p></li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to null.</p></li>
<li><p>Set <var>element</var>'s <span>details toggle task tracker</span> to null.</p></li>
</ol>
</li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to a struct with <span
<li><p>Set <var>element</var>'s <span>details toggle task tracker</span> to a struct with <span
data-x="toggle-task-task">task</span> set to the just-queued <span
data-x="concept-task">task</span> and <span data-x="toggle-task-old-state">old state</span> set
to <var>oldState</var>.</p></li>
Expand Down Expand Up @@ -77688,7 +77689,7 @@ dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
data-x="dom-ToggleEvent-newState">newState</code></dfn> attributes must return the values they are
initialized to.</p>

<p>A <dfn>toggle task tracker</dfn> is either null or a <span>struct</span> which has:</p>
<p>A <dfn>toggle task tracker</dfn> is a <span>struct</span> which has:</p>

<dl>
<dt><dfn data-x="toggle-task-task">task</dfn></dt>
Expand Down Expand Up @@ -82685,8 +82686,8 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<p>Every <span data-x="HTML elements">HTML element</span> has a <dfn>popover showing or
hiding</dfn>, which is a boolean, initially set to false.</p>

<p>Every <span data-x="HTML elements">HTML element</span> has a <span>toggle task tracker</span>,
initially null.</p>
<p>Every <span data-x="HTML elements">HTML element</span> <dfn>popover toggle task tracker</dfn>,
which is a <span>toggle task tracker</span> or null, initially nul.</p>

<p>The following <span data-x="concept-element-attributes-change-ext">attribute change
steps</span>, given <var>element</var>, <var>localName</var>, <var>oldValue</var>,
Expand Down Expand Up @@ -82852,16 +82853,16 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {

<ol>
<li>
<p>If <var>element</var>'s <span>toggle task tracker</span> is not null, then:</p>
<p>If <var>element</var>'s <span>popover toggle task tracker</span> is not null, then:</p>

<ol>
<li><p>Set <var>oldState</var> to <var>element</var>'s <span>toggle task tracker</span>'s
<span data-x="toggle-task-old-state">old state</span>.</p></li>
<li><p>Set <var>oldState</var> to <var>element</var>'s <span>popover toggle task
tracker</span>'s <span data-x="toggle-task-old-state">old state</span>.</p></li>

<li><p>Remove <var>element</var>'s <span>toggle task tracker</span>'s <span
<li><p>Remove <var>element</var>'s <span>popover toggle task tracker</span>'s <span
data-x="toggle-task-task">task</span> from its <span>task queue</span>.</p></li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to null.</p></li>
<li><p>Set <var>element</var>'s <span>popover toggle task tracker</span> to null.</p></li>
</ol>
</li>

Expand All @@ -82876,11 +82877,11 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
<var>oldState</var> and the <code data-x="dom-ToggleEvent-newState">newState</code> attribute
initialized to <var>newState</var>.</p></li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to null.</p></li>
<li><p>Set <var>element</var>'s <span>popover toggle task tracker</span> to null.</p></li>
</ol>
</li>

<li><p>Set <var>element</var>'s <span>toggle task tracker</span> to a struct with <span
<li><p>Set <var>element</var>'s <span>popover toggle task tracker</span> to a struct with <span
data-x="toggle-task-task">task</span> set to the just-queued <span
data-x="concept-task">task</span> and <span data-x="toggle-task-old-state">old state</span> set
to <var>oldState</var>.</p></li>
Expand Down Expand Up @@ -83608,61 +83609,6 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
</li>
</ol>

<h4>The <code>ToggleEvent</code> interface</h4>

<pre><code class="idl">[Exposed=Window]
interface <dfn interface>ToggleEvent</dfn> : <span>Event</span> {
constructor(DOMString type, optional <span>ToggleEventInit</span> eventInitDict = {});
readonly attribute DOMString oldState;
readonly attribute DOMString newState;
};

dictionary <dfn dictionary>ToggleEventInit</dfn> : <span>EventInit</span> {
DOMString oldState = "";
DOMString newState = "";
};</code></pre>

<dl class="domintro">
<dt><code data-x=""><var>event</var>.<span subdfn
data-x="dom-ToggleEvent-oldState">oldState</span></code></dt>

<dd>
<p>Set to "<code data-x="">closed</code>" when transitioning from closed to open, or set to
"<code data-x="">open</code>" when transitioning from open to closed.</p>
</dd>

<dt><code data-x=""><var>event</var>.<span subdfn
data-x="dom-ToggleEvent-newState">newState</span></code></dt>

<dd>
<p>Set to "<code data-x="">open</code>" when transitioning from closed to open, or set to "<code
data-x="">closed</code>" when transitioning from open to closed.</p>
</dd>
</dl>

<p>The <dfn attribute for="ToggleEvent"><code
data-x="dom-ToggleEvent-oldState">oldState</code></dfn> attribute must return the value it
was initialized to. It is initialized to "<code data-x="">open</code>" if the element with the
<code data-x="attr-popover">popover</code> attribute's <span>popover visibility state</span> is
<span data-x="popover-showing-state">showing</span>; otherwise "<code
data-x="">closed</code>".</p>

<p>The <dfn attribute for="ToggleEvent"><code
data-x="dom-ToggleEvent-newState">newState</code></dfn> attribute must return the value it was
initialized to. It is initialized to "<code data-x="">closed</code>" if the element with the <code
data-x="attr-popover">popover</code> attribute's <span>popover visibility state</span> is <span
data-x="popover-showing-state">showing</span>; otherwise "<code data-x="">open</code>".</p>

<p>A <dfn>toggle task tracker</dfn> is either null or a <span>struct</span> which has:</p>

<dl>
<dt><dfn data-x="toggle-task-task">task</dfn></dt>
<dd>A <span data-x="concept-task">task</span> which fires a <code>ToggleEvent</code>.</dd>

<dt><dfn data-x="toggle-task-old-state">old state</dfn></dt>
<dd>A string which represents the <span data-x="toggle-task-task">task</span>'s event's value for
the <code data-x="dom-ToggleEvent-oldState">oldState</code> attribute.</dd>
</dl>

<h2 split-filename="browsers" id="browsers">Loading web pages</h2>

Expand Down

0 comments on commit 47ac7d1

Please sign in to comment.