Skip to content

Commit

Permalink
Move ToggleEvent to “Activation behavior of elements” section
Browse files Browse the repository at this point in the history
  • Loading branch information
sideshowbarker committed Aug 23, 2023
1 parent 71f1422 commit 4aabc02
Showing 1 changed file with 55 additions and 56 deletions.
111 changes: 55 additions & 56 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -77651,6 +77651,61 @@ partial interface <span id="NavigatorUserActivation-partial">Navigator</span> {

</div>

<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>


<h3>Focus</h3>
Expand Down Expand Up @@ -83561,62 +83616,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>

<div w-nodev>
Expand Down

0 comments on commit 4aabc02

Please sign in to comment.