Skip to content

Tag: removeeventlistener

.removeEventListener(); by name or reference?

Say you have simple: Does removeEventListener remove a registered listener for click events named clickHandler or does it remove a registered listener for click events referencing the very same function that clickHandler references? Here they say: The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options