UIEvent.detail

The UIEvent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.

For click or dblclick events, UIEvent.detail is the current click count.

For mousedown or mouseup events, UIEvent.detail is 1 plus the current click count.

For all other UIEvent objects, UIEvent.detail is always zero.

Specifications

Specification Status Comment
Document Object Model (DOM) Level 3 Events Specification
The definition of 'UIEvent.detail' in that specification.
Obsolete
Document Object Model (DOM) Level 2 Events Specification
The definition of 'UIEvent.detail' in that specification.
Obsolete Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
detailChrome Full support YesEdge Full support 12Firefox Full support YesIE Partial support 9
Notes
Partial support 9
Notes
Notes Always 0 on click and dblclick events. On mousedown and mouseup events, the count is not unique to the element, but is rather the global click count for the current document -- even across refreshes.
Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support
Full support
Partial support
Partial support
See implementation notes.
See implementation notes.