Edit in JSFiddle

document.addEventListener('click', clickFunc);

function clickFunc(e){
  console.debug(e.detail);
}