View event listeners - Javascript

iConnor picture iConnor · Jul 22, 2013 · Viewed 13.1k times · Source

I'm wondering if it is possible to view

1. How many event listeners

2. What type of event listener

On a single web page.

Reason being is becuase im using off(); method.

I'm using this framework, which is basically jQuery but not.

Yeah, I'm using off but the even't isn't removing and and I have a feeling there is more than one eventListener on the element.

If it is not possible with javascript, it is possible in the browser?

Answer

iConnor picture iConnor · Aug 31, 2013

A long time passes...

I have found something new in Chrome DevTools.

Simple as this in the console

getEventListeners(yourElement);

Documentation: https://developers.google.com/chrome-developer-tools