Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 41 additions & 4 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/the/this/ ?

Copy link
Member Author

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.


<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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove and set here call the DOM hooks for removing and setting attributes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At first I did, but I noticed that nowhere else in the spec do we do that so far, so probably leave that for a later cleanup.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used in some places, search for concept-element-attributes-


<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>
Expand Down Expand Up @@ -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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed to match the others; the first summary child, not the first element child

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