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
Browser compatibility
|
Desktop |
Mobile |
|
Chrome |
Edge |
Firefox |
Internet Explorer |
Opera |
Safari |
WebView Android |
Chrome Android |
Firefox for Android |
Opera Android |
Safari on IOS |
Samsung Internet |
detail |
1 |
12 |
1 |
9Always 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.
|
≤12.1 |
1 |
≤37 |
18 |
4 |
≤12.1 |
1 |
1.0 |