views:

607

answers:

1

Tried to search online, but does not look like I can formulate search query properly.

So as simple as it sounds, how can I, either with jquery or just javascript list all the handlers or event listeners that are attached to element(s)/document/window or present in dom.

Just wondering.

Thank you in advance.

+6  A: 

Try using $("#element").data("events")

EDIT:

There is also jQuery extension: listHandlers

Laimoncijus
thank you Laimoncijus, how would you pull that without jquery? may be you could give me link to reading material regarding this subject.
GnrlBzik
Seems it is not really possible in current implementation of W3C events model. See: http://www.quirksmode.org/js/events_advanced.html(search for "Which event handlers are registered?")The page there is a little older, so maybe now things got better, can't tell you thins, never tried it myself...
Laimoncijus
Thank you Laimoncijus : )
GnrlBzik