-
Notifications
You must be signed in to change notification settings - Fork 3k
Add activation behavior for <summary> #2256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
21f0e0e
0af23ce
fe1f47d
85bb4d7
f3dea96
b3f0bc6
28590b2
d324ffe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55564,10 +55564,17 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> { | |
| information should be shown.</p> | ||
|
|
||
| <p>The user agent should allow the user to request that the additional information be shown or | ||
| hidden. To honor a request for the details to be shown, the user agent must set the <code | ||
| data-x="attr-details-open">open</code> attribute on the element to the value <code | ||
| 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> | ||
| hidden. To honor a request for the details to be shown, the user agent must <span | ||
| data-x="concept-element-attributes-set-value">set</span> the <code | ||
| data-x="attr-details-open">open</code> attribute on the element to the empty string. To honor a | ||
| request for the information to be hidden, the user agent must <span | ||
| data-x="concept-element-attributes-remove">remove</span> the <code | ||
| data-x="attr-details-open">open</code> attribute from the element.</p> | ||
|
|
||
| <p class="note">This ability to request that additional information be shown or hidden may simply | ||
| be the <span>activation behavior</span> of the appropriate <code>summary</code> element, in the | ||
| case such an element exists. However, if no such element exists, user agents should still provide | ||
| this ability through some other user interface affordance.</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 | ||
|
|
@@ -55685,6 +55692,33 @@ interface <dfn>HTMLDetailsElement</dfn> : <span>HTMLElement</span> { | |
| rest of the contents of the <code>summary</code> element's parent <code>details</code> | ||
| element<span w-nodev>, if any</span>.</p> | ||
|
|
||
| <div w-nodev> | ||
|
|
||
| <p>The <span>activation behavior</span> of <code>summary</code> elements is to run the following | ||
| steps:</p> | ||
|
|
||
| <ol> | ||
| <li><p>If this <code>summary</code> element has no parent node, then abort these steps.</p></li> | ||
|
|
||
| <li><p>Let <var>parent</var> be this <code>summary</code> element's parent node.</p> | ||
|
|
||
| <li><p>If <var>parent</var> is not a <code>details</code> element, then abort these steps.</p> | ||
|
|
||
| <li><p>If <var>parent</var>'s first child <code>summary</code> element is not this | ||
| <code>summary</code> element, then abort these steps.</p></li> | ||
|
||
|
|
||
| <li> | ||
| <p>If the <code data-x="attr-details-open">open</code> attribute is present on | ||
| <var>parent</var>, then <span data-x="concept-element-attributes-remove">remove</span> it. | ||
| Otherwise, <span data-x="concept-element-attributes-set-value">set</span> <var>parent</var>'s | ||
| <code data-x="attr-details-open">open</code> attribute to the empty string.</p> | ||
|
|
||
| <p class="note">This will then run the <span>details notification task steps</span>.</p> | ||
| </li> | ||
| </ol> | ||
|
|
||
| </div> | ||
|
|
||
|
|
||
|
|
||
| <h4 id="the-menu-element">The <dfn id="menus"><code>menu</code></dfn> element</h4> | ||
|
|
@@ -72501,6 +72535,9 @@ END:VCARD</pre> | |
|
|
||
| <li><code>menuitem</code> elements</li> | ||
|
|
||
| <li><code>summary</code> elements that are the first child <code>summary</code> element of a | ||
|
||
| <code>details</code> element</li> | ||
|
|
||
| <li>Elements with a <code data-x="attr-draggable">draggable</code> attribute set, if that would | ||
| enable the user agent to allow the user to begin a drag operations for those elements without | ||
| the use of a pointing device</li> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/the/this/ ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to reserve "this" for method steps, but not for any super-great reason.