document.addEventListener("click", (e) => { if (e.button == 0) { // Left click if (e.target.tagName == "") { } } });