some student
some student

Reputation: 381

getting an element's EventListeners

In safari's (and chrome's) element inspector there's an "Event Listeners" section (in the right frame of the elements tab) that show's the Event Listeners in the document. Is there anything similar in firebug? Also, is it possible to get an element's event listeners using javascript (like elmnt.onclick, but should work for events added with addEventListener() as well)?

Upvotes: 2

Views: 1188

Answers (1)

Hemlock
Hemlock

Reputation: 6210

This is available for firebug:

http://getfirebug.com/wiki/index.php/Firebug_Extensions#Eventbug

For your second question, is it possible to get the events added via addEventListener in javascript? Generally it is not. That add-on uses eventlistenerservice you would need elevated privileges, a signed script and it would still only work in Firefox.

Upvotes: 2

Related Questions