Skip to content

Commit

Permalink
Use ToggleEvent for <details> element toggle event
Browse files Browse the repository at this point in the history
  • Loading branch information
nt1m committed Feb 16, 2023
1 parent 2f6e75f commit e628022
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -58902,8 +58902,19 @@ interface <dfn interface>HTMLDetailsElement</dfn> : <span>HTMLElement</span> {
fired.</p>
</li>

<li><p><span data-x="concept-event-fire">Fire an event</span> named <code
data-x="event-toggle">toggle</code> at the <code>details</code> element.</p></li>
<li><p>If the <code data-x="attr-details-open">open</code> attribute is added, <span
data-x="concept-event-fire">fire an event</span> named <code data-x="event-toggle">toggle</code>
using <code>ToggleEvent</code>, with the <code data-x="dom-ToggleEvent-oldState">oldState</code>
attribute initialized to "<code data-x="">closed</code>", and the <code
data-x="dom-ToggleEvent-newState">newState</code> attribute initialized to "<code
data-x="">open</code>" at the <code>details</code> element.</p></li>

<li><p>Otherwise, <span data-x="concept-event-fire">fire an event</span> named <code
data-x="event-toggle">toggle</code> using <code>ToggleEvent</code>, with the <code
data-x="dom-ToggleEvent-oldState">oldState</code> attribute initialized to "<code
data-x="">open</code>", and the <code data-x="dom-ToggleEvent-newState">newState</code>
attribute initialized to "<code data-x="">closed</code>" at the <code>details</code>
element.</p></li>
</ol>

<p>The <dfn attribute for="HTMLDetailsElement"><code data-x="dom-details-open">open</code></dfn>
Expand Down Expand Up @@ -132164,7 +132175,7 @@ INSERT INTERFACES HERE

<tr> <!-- toggle -->
<td> <dfn event for="HTMLElement"><code data-x="event-toggle">toggle</code></dfn>
<td> <code>Event</code> or <code>ToggleEvent</code>
<td> <code>ToggleEvent</code>
<td> <code>details</code> and <span data-x="attr-popover">popover</span> elements
<td> Fired at <code>details</code> elements when they open or close; fired on elements with the
<code data-x="attr-popover">popover</code> attribute when they are transitioning between
Expand Down

0 comments on commit e628022

Please sign in to comment.