Forum Moderators: open

Message Too Old, No Replies

a tool for inspecting event handlers?

         

httpwebwitch

3:16 pm on Apr 2, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

one of our regression testers asked me this, and I had to admit I didn't have a positive answer.

Is there a tool that will let you inspect the DOM of any page, and see the Event Handlers for any particular element?

Let me be more specific... every element will have the full set of event handlers, the onclick and onblur and onmouseover and ondancer and ondasher etc. What I want is a way to see event handlers that are assigned a function or statement block, ie ones that are not null or undefined.

Firebug will show me custom events that have been added to an element, such as those added by Mootools (dispose, destroy, clone, fireEvent, etc). But it doesn't let me enumerate the built-in events like onclick, onmouseover.

Any ideas?

coopster

12:37 am on Apr 3, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I had the same need awhile back. I took this example from the mozilla developer's manual page and rolled my own:

[developer.mozilla.org...]