Navneet Navneet - 4 years ago 97
Javascript Question

How to find event listeners on a DOM node when debugging or from the JavaScript code?

I have a page where some event listeners are attached to input boxes and select boxes. Is there a way to find out which event listeners are observing a particular DOM node and for what event?

Events are attached using:

  1. Prototype's

  2. DOM's

  3. As element attribute

Answer Source

If you just need to inspect what's happening on a page, you might try the Visual Event bookmarklet.

Update: Visual Event 2 available;

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download