Skip to content

Commit

Permalink
[giow] (2) <details ontoggle=''> for when you open or close a <dialog>.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=22942
Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@8251 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Nov 6, 2013
1 parent 78371ba commit 899e6fa
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 2 deletions.
33 changes: 32 additions & 1 deletion complete.html
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 1 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 November 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -10436,6 +10436,7 @@ <h4 id=global-attributes><span class=secno>3.2.5 </span><dfn>Global attributes</
<li><code title=handler-onsubmit><a href=#handler-onsubmit>onsubmit</a></code></li>
<li><code title=handler-onsuspend><a href=#handler-onsuspend>onsuspend</a></code></li>
<li><code title=handler-ontimeupdate><a href=#handler-ontimeupdate>ontimeupdate</a></code></li>
<li><code title=handler-ontoggle><a href=#handler-ontoggle>ontoggle</a></code></li>
<li><code title=handler-onvolumechange><a href=#handler-onvolumechange>onvolumechange</a></code></li>
<li><code title=handler-onwaiting><a href=#handler-onwaiting>onwaiting</a></code></li>
</ul><p class=note>The attributes marked with an asterisk have a different meaning when specified on
Expand Down Expand Up @@ -49466,6 +49467,29 @@ <h4 id=the-details-element><span class=secno>4.11.1 </span>The <dfn><code>detail
hidden. To honor a request for the details to be shown, the user agent must set the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute on the element to the value <code title="">open</code>. To honor a request for the information to be hidden, the user agent must
remove the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute from the element.</p>

<p>Whenever the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute is added to or removed from
a <code><a href=#the-details-element>details</a></code> element, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
following steps, which are known as the <dfn id=details-notification-task-steps>details notification task steps</dfn>, for this
<code><a href=#the-details-element>details</a></code> element:</p>

<ol><li>

<p>If another <a href=#concept-task title=concept-task>task</a> has been <a href=#queue-a-task title="queue a
task">queued</a> to run the <a href=#details-notification-task-steps>details notification task steps</a> for this
<code><a href=#the-details-element>details</a></code> element, then abort these steps.</p>

<p class=note>When the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute is toggled
several times in succession, these steps essentially get coalesced so that only one event is
fired.</p>

</li>

<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-toggle>toggle</code> at the
<code><a href=#the-details-element>details</a></code> element.</li>

</ol><p>The <a href=#task-source>task source</a> for this task must be the <a href=#dom-manipulation-task-source>DOM manipulation task
source</a>.</p>

<p>The <dfn id=dom-details-open title=dom-details-open><code>open</code></dfn> IDL attribute must
<a href=#reflect>reflect</a> the <code title=attr-details-open><a href=#attr-details-open>open</a></code> content attribute.</p>

Expand Down Expand Up @@ -71312,6 +71336,7 @@ <h5 id=event-handlers-on-elements,-document-objects,-and-window-objects><span cl
<tr><td><dfn id=handler-onsubmit title=handler-onsubmit><code>onsubmit</code></dfn> <td> <code title=event-submit>submit</code> <!-- widely used -->
<tr><td><dfn id=handler-onsuspend title=handler-onsuspend><code>onsuspend</code></dfn> <td> <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code>
<tr><td><dfn id=handler-ontimeupdate title=handler-ontimeupdate><code>ontimeupdate</code></dfn> <td> <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code>
<tr><td><dfn id=handler-ontoggle title=handler-ontoggle><code>ontoggle</code></dfn> <td> <code title=event-toggle>toggle</code>
<tr><td><dfn id=handler-onvolumechange title=handler-onvolumechange><code>onvolumechange</code></dfn> <td> <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code>
<tr><td><dfn id=handler-onwaiting title=handler-onwaiting><code>onwaiting</code></dfn> <td> <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code>

Expand Down Expand Up @@ -71434,6 +71459,7 @@ <h5 id=event-handlers-on-elements,-document-objects,-and-window-objects><span cl
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onsubmit title=handler-onsubmit>onsubmit</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onsuspend title=handler-onsuspend>onsuspend</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-ontimeupdate title=handler-ontimeupdate>ontimeupdate</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-ontoggle title=handler-ontoggle>ontoggle</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onvolumechange title=handler-onvolumechange>onvolumechange</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onwaiting title=handler-onwaiting>onwaiting</a>;
};
Expand Down Expand Up @@ -100027,6 +100053,11 @@ <h3 class=no-num id=element-content-categories>Element content categories</h3>
<td> <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> event handler
<td> <a href=#event-handler-content-attributes title="event handler content attributes">Event handler content attribute</a>

<tr><th id=ix-handler-ontoggle> <code title="">ontoggle</code>
<td> <a href=#handler-ontoggle title=handler-ontoggle>HTML elements</a>
<td> <code title=event-toggle>toggle</code> event handler
<td> <a href=#event-handler-content-attributes title="event handler content attributes">Event handler content attribute</a>

<tr><th id=ix-handler-window-onunload> <code title="">onunload</code>
<td> <code title=handler-window-onunload><a href=#handler-window-onunload>body</a></code>
<td> <code title=event-unload>unload</code> event handler for <code><a href=#window>Window</a></code> object
Expand Down
33 changes: 32 additions & 1 deletion index
Expand Up @@ -298,7 +298,7 @@

<header class=head id=head><p><a href=http://www.whatwg.org/ class=logo><img width=101 src=/images/logo alt=WHATWG height=101></a></p>
<hgroup><h1 class=allcaps>HTML</h1>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 1 November 2013</h2>
<h2 class="no-num no-toc">Living Standard &mdash; Last Updated 6 November 2013</h2>
</hgroup><dl><dt><strong>Web developer edition:</strong></dt>
<dd><strong><a href=http://developers.whatwg.org/>http://developers.whatwg.org/</a></strong></dd>
<dt>Multiple-page version:</dt>
Expand Down Expand Up @@ -10436,6 +10436,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<li><code title=handler-onsubmit><a href=#handler-onsubmit>onsubmit</a></code></li>
<li><code title=handler-onsuspend><a href=#handler-onsuspend>onsuspend</a></code></li>
<li><code title=handler-ontimeupdate><a href=#handler-ontimeupdate>ontimeupdate</a></code></li>
<li><code title=handler-ontoggle><a href=#handler-ontoggle>ontoggle</a></code></li>
<li><code title=handler-onvolumechange><a href=#handler-onvolumechange>onvolumechange</a></code></li>
<li><code title=handler-onwaiting><a href=#handler-onwaiting>onwaiting</a></code></li>
</ul><p class=note>The attributes marked with an asterisk have a different meaning when specified on
Expand Down Expand Up @@ -49466,6 +49467,29 @@ fur
hidden. To honor a request for the details to be shown, the user agent must set the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute on the element to the value <code title="">open</code>. To honor a request for the information to be hidden, the user agent must
remove the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute from the element.</p>

<p>Whenever the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute is added to or removed from
a <code><a href=#the-details-element>details</a></code> element, the user agent must <a href=#queue-a-task>queue a task</a> that runs the
following steps, which are known as the <dfn id=details-notification-task-steps>details notification task steps</dfn>, for this
<code><a href=#the-details-element>details</a></code> element:</p>

<ol><li>

<p>If another <a href=#concept-task title=concept-task>task</a> has been <a href=#queue-a-task title="queue a
task">queued</a> to run the <a href=#details-notification-task-steps>details notification task steps</a> for this
<code><a href=#the-details-element>details</a></code> element, then abort these steps.</p>

<p class=note>When the <code title=attr-details-open><a href=#attr-details-open>open</a></code> attribute is toggled
several times in succession, these steps essentially get coalesced so that only one event is
fired.</p>

</li>

<li><p><a href=#fire-a-simple-event>Fire a simple event</a> named <code title=event-toggle>toggle</code> at the
<code><a href=#the-details-element>details</a></code> element.</li>

</ol><p>The <a href=#task-source>task source</a> for this task must be the <a href=#dom-manipulation-task-source>DOM manipulation task
source</a>.</p>

<p>The <dfn id=dom-details-open title=dom-details-open><code>open</code></dfn> IDL attribute must
<a href=#reflect>reflect</a> the <code title=attr-details-open><a href=#attr-details-open>open</a></code> content attribute.</p>

Expand Down Expand Up @@ -71312,6 +71336,7 @@ typedef <a href=#onbeforeunloadeventhandlernonnull>OnBeforeUnloadEventHandlerNon
<tr><td><dfn id=handler-onsubmit title=handler-onsubmit><code>onsubmit</code></dfn> <td> <code title=event-submit>submit</code> <!-- widely used -->
<tr><td><dfn id=handler-onsuspend title=handler-onsuspend><code>onsuspend</code></dfn> <td> <code title=event-media-suspend><a href=#event-media-suspend>suspend</a></code>
<tr><td><dfn id=handler-ontimeupdate title=handler-ontimeupdate><code>ontimeupdate</code></dfn> <td> <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code>
<tr><td><dfn id=handler-ontoggle title=handler-ontoggle><code>ontoggle</code></dfn> <td> <code title=event-toggle>toggle</code>
<tr><td><dfn id=handler-onvolumechange title=handler-onvolumechange><code>onvolumechange</code></dfn> <td> <code title=event-media-volumechange><a href=#event-media-volumechange>volumechange</a></code>
<tr><td><dfn id=handler-onwaiting title=handler-onwaiting><code>onwaiting</code></dfn> <td> <code title=event-media-waiting><a href=#event-media-waiting>waiting</a></code>

Expand Down Expand Up @@ -71434,6 +71459,7 @@ interface <dfn id=globaleventhandlers>GlobalEventHandlers</dfn> {
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onsubmit title=handler-onsubmit>onsubmit</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onsuspend title=handler-onsuspend>onsuspend</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-ontimeupdate title=handler-ontimeupdate>ontimeupdate</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-ontoggle title=handler-ontoggle>ontoggle</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onvolumechange title=handler-onvolumechange>onvolumechange</a>;
attribute <a href=#eventhandler>EventHandler</a> <a href=#handler-onwaiting title=handler-onwaiting>onwaiting</a>;
};
Expand Down Expand Up @@ -100027,6 +100053,11 @@ if (s = prompt('What is your name?')) {
<td> <code title=event-media-timeupdate><a href=#event-media-timeupdate>timeupdate</a></code> event handler
<td> <a href=#event-handler-content-attributes title="event handler content attributes">Event handler content attribute</a>

<tr><th id=ix-handler-ontoggle> <code title="">ontoggle</code>
<td> <a href=#handler-ontoggle title=handler-ontoggle>HTML elements</a>
<td> <code title=event-toggle>toggle</code> event handler
<td> <a href=#event-handler-content-attributes title="event handler content attributes">Event handler content attribute</a>

<tr><th id=ix-handler-window-onunload> <code title="">onunload</code>
<td> <code title=handler-window-onunload><a href=#handler-window-onunload>body</a></code>
<td> <code title=event-unload>unload</code> event handler for <code><a href=#window>Window</a></code> object
Expand Down
36 changes: 36 additions & 0 deletions source
Expand Up @@ -10307,6 +10307,7 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
<li><code data-x="handler-onsubmit">onsubmit</code></li>
<li><code data-x="handler-onsuspend">onsuspend</code></li>
<li><code data-x="handler-ontimeupdate">ontimeupdate</code></li>
<li><code data-x="handler-ontoggle">ontoggle</code></li>
<li><code data-x="handler-onvolumechange">onvolumechange</code></li>
<li><code data-x="handler-onwaiting">onwaiting</code></li>
</ul>
Expand Down Expand Up @@ -54518,6 +54519,33 @@ fur
data-x="">open</code>. To honor a request for the information to be hidden, the user agent must
remove the <code data-x="attr-details-open">open</code> attribute from the element.</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 <span>queue a task</span> that runs the
following steps, which are known as the <dfn>details notification task steps</dfn>, for this
<code>details</code> element:</p>

<ol>

<li>

<p>If another <span data-x="concept-task">task</span> has been <span data-x="queue a
task">queued</span> to run the <span>details notification task steps</span> for this
<code>details</code> element, then abort these steps.</p>

<p class="note">When the <code data-x="attr-details-open">open</code> attribute is toggled
several times in succession, these steps essentially get coalesced so that only one event is
fired.</p>

</li>

<li><p><span>Fire a simple event</span> named <code data-x="event-toggle">toggle</code> at the
<code>details</code> element.</p></li>

</ol>

<p>The <span>task source</span> for this task must be the <span>DOM manipulation task
source</span>.</p>

<p>The <dfn data-x="dom-details-open"><code>open</code></dfn> IDL attribute must
<span>reflect</span> the <code data-x="attr-details-open">open</code> content attribute.</p>

Expand Down Expand Up @@ -79636,6 +79664,7 @@ typedef <span>OnBeforeUnloadEventHandlerNonNull</span>? <dfn>OnBeforeUnloadEvent
<tr><td><dfn data-x="handler-onsubmit"><code>onsubmit</code></dfn> <td> <code data-x="event-submit">submit</code> <!-- widely used -->
<tr><td><dfn data-x="handler-onsuspend"><code>onsuspend</code></dfn> <td> <code data-x="event-media-suspend">suspend</code>
<tr><td><dfn data-x="handler-ontimeupdate"><code>ontimeupdate</code></dfn> <td> <code data-x="event-media-timeupdate">timeupdate</code>
<tr><td><dfn data-x="handler-ontoggle"><code>ontoggle</code></dfn> <td> <code data-x="event-toggle">toggle</code>
<tr><td><dfn data-x="handler-onvolumechange"><code>onvolumechange</code></dfn> <td> <code data-x="event-media-volumechange">volumechange</code>
<tr><td><dfn data-x="handler-onwaiting"><code>onwaiting</code></dfn> <td> <code data-x="event-media-waiting">waiting</code>

Expand Down Expand Up @@ -79784,6 +79813,7 @@ interface <dfn>GlobalEventHandlers</dfn> {
attribute <span>EventHandler</span> <span data-x="handler-onsubmit">onsubmit</span>;
attribute <span>EventHandler</span> <span data-x="handler-onsuspend">onsuspend</span>;
attribute <span>EventHandler</span> <span data-x="handler-ontimeupdate">ontimeupdate</span>;
attribute <span>EventHandler</span> <span data-x="handler-ontoggle">ontoggle</span>;
attribute <span>EventHandler</span> <span data-x="handler-onvolumechange">onvolumechange</span>;
attribute <span>EventHandler</span> <span data-x="handler-onwaiting">onwaiting</span>;
};
Expand Down Expand Up @@ -111618,6 +111648,12 @@ if (s = prompt('What is your name?')) {
<td> <code data-x="event-media-timeupdate">timeupdate</code> event handler
<td> <span data-x="event handler content attributes">Event handler content attribute</span>

<tr>
<th id="ix-handler-ontoggle"> <code data-x="">ontoggle</code>
<td> <span data-x="handler-ontoggle">HTML elements</span>
<td> <code data-x="event-toggle">toggle</code> event handler
<td> <span data-x="event handler content attributes">Event handler content attribute</span>

<tr>
<th id="ix-handler-window-onunload"> <code data-x="">onunload</code>
<td> <code data-x="handler-window-onunload">body</code>
Expand Down

0 comments on commit 899e6fa

Please sign in to comment.