Web/API/UIEvent/detail

From Get docs


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 SpecificationThe definition of 'UIEvent.detail' in that specification. Obsolete  
Document Object Model (DOM) Level 2 Events SpecificationThe definition of 'UIEvent.detail' in that specification. Obsolete Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
detail Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE 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 Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

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