element.onclick = event => { if (event.detail === 1) { // it was a single click } else if (event.detail === 2) { // it was a double click } };