Skip to content
Advertisement

Remove custom event listener

I’m listening to a custom event:

JavaScript

I need to remove the listener. I’ve tried:

JavaScript

but neither work. What am I doing wrong?

Advertisement

Answer

The third argument to removeEventListener is mandatory. try this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement