[Greasemonkey] eventListenerList()
Bill Donnelly
donnelly at snowcrest.net
Mon Jan 16 15:07:08 EST 2006
FYI from a somewhat recent discussion
Which event handlers are registered?
One problem of the current implementation of W3C’s event registration model
is that you can’t find out if any event handlers are already registered to
an element. In the traditional model you could do:
alert (element.onclick)
and you see the function that’s registered to it, or undefined if nothing
is registered. Only in its very recent DOM Level 3 Events W3C adds an
eventListenerList to store a list of event handlers that are currently
registered on an element. This functionality is not yet supported by any
browser,
it’s too new. However, the problem has been addressed.
Fortunately removeEventListener() doesn’t give any errors if the event
listener you want to remove has not been added to the element, so when
in doubt
you can always use removeEventListener().
http://www.quirksmode.org/js/events_advanced.html
More information about the Greasemonkey
mailing list