Event handlers receive an event object with details about what happened.
button.addEventListener("click", function(event) {
console.log(event.type); // "click"
console.log(event.target); // The clicked element
console.log(event.clientX); // Mouse X position
});
The event object varies by event type but always includes type and target.