HiveBrain v1.2.0
Get Started
← Back to all entries
snippetjavascriptCritical

How to find event listeners on a DOM node in JavaScript or in debugging?

Submitted by: @import:stackoverflow-api··
0
Viewed 0 times
howeventdomfindlistenersdebuggingnodejavascript

Problem

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:

  • Prototype's Event.observe;



  • DOM's addEventListener;



  • As element attribute element.onclick.

Solution

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

Update: Visual Event 2 available.

Context

Stack Overflow Q#446892, score: 541

Revisions (0)

No revisions yet.