This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 14101 - Add an event for when the <details open=""> attribute is added or removed
Summary: Add an event for when the <details open=""> attribute is added or removed
Status: RESOLVED LATER
Alias: None
Product: HTML.next
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
Hardware: Other other
: P3 enhancement
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
: 15438 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-10 19:01 UTC by contributor
Modified: 2012-09-14 12:15 UTC (History)
10 users (show)

See Also:


Attachments

Description contributor 2011-09-10 19:01:25 UTC
Specification: http://dev.w3.org/html5/spec/Overview.html
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
I think it would be usefull to add a new event to the details element which
would fire when it is opened or closed. 

Posted from: 79.113.72.32
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1
Comment 1 Ian 'Hixie' Hickson 2011-10-19 23:50:42 UTC
Not a bad idea. We could reuse onchange, or we could introduce onopen/onclose... any opinions?
Comment 2 Ian 'Hixie' Hickson 2011-10-25 04:43:48 UTC
It would have to be a queued task that fires the event, and it would have to coalesce events so if the attribute is toggled a lot in a row, only one event actually fires. Maybe just by delaying the event if there's another task already queued (can be done by having the element have a counter which is incremented when a task is queued, decremented when the task runs, and the event is only fired when the count is zero after the decrement).
Comment 3 Ian 'Hixie' Hickson 2011-10-31 21:19:57 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: none yet
Rationale:

I'm going to delay this while we wait for more implementation experience (there's only one browser shipping <details> currently it seems).

In the meantime, if anyone has any good suggestion for an event name, that'd be great. I'd rather have a single event, which rules out onopen/onclose, and I'd rather not interfere with forms (which rules out onchange).
Comment 4 Kang-Hao (Kenny) Lu 2012-01-06 14:34:51 UTC
*** Bug 15438 has been marked as a duplicate of this bug. ***
Comment 5 Michael A. Peters 2012-01-06 16:16:56 UTC
Since details either has a state of open or closed, how about

onstatechange