The event object is passed to the handler and describes what happened. event.target is the originating element, event.currentTarget the one holding the listener, event.key the key, event.preventDefault() cancels the default behavior, such as submitting a form or following a link.
Example
form.addEventListener('submit', (e) => {
e.preventDefault()
})