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 22072 - "current click count" deserves its own attribute
Summary: "current click count" deserves its own attribute
Status: RESOLVED WONTFIX
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - DOM3 Events (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Travis Leithead [MSFT]
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-17 16:09 UTC by Gary Kacmarcik
Modified: 2013-06-19 00:08 UTC (History)
4 users (show)

See Also:


Attachments

Description Gary Kacmarcik 2013-05-17 16:09:29 UTC
In 5.2.3 Mouse Event Types:
http://www.w3.org/TR/DOM-Level-3-Events/#events-mouseevents

The last paragraph of this section states:

"Implementations must maintain the current click count when generating mouse events. This must be a non-negative integer indicating the number of consecutive clicks of a pointing device button within a specific time. The delay after which the count resets is specific to the environment configuration."

Later on, the spec indicates that this should be stored in UIEvent.detail.

If nothing else, there should be more information in 5.2.3 about where/how the click count is stored/used.

But why isn't this stored in a proper attribute rather than stuffed away in a generic 'detail' attribute?
Comment 1 Anne 2013-05-17 16:24:38 UTC
It has been .details since forever I think. Not sure why'd change that.
Comment 2 Olli Pettay 2013-05-17 17:51:38 UTC
Yeah, .detail has been used for that for ages. In theory we could add
another property but not sure why.
Comment 3 Gary Kacmarcik 2013-05-18 01:27:54 UTC
Having a named property for a specific purpose is better than storing data in a generic catch-all 'data' (or 'detail' in this case) attribute.

Code that references something like 'event.clickCount' is self-documenting whereas with 'event.detail' you have to think about what is stored there for the particular event you're looking at.

So, a proper attribute name is clearly better, but perhaps it's too late to update this.