Use cases for "Which event handlers are registered?"

Hi,

  From <http://www.quirksmode.org/js/events_advanced.html>:

[...]
  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.
[...]

Could you elaborate on where facilities to discover listeners might be
useful? The listener list has been replaced by two methods willTriggerNS
and hasEventListenerNS on EventTarget,

  http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-EventTarget

and the WebAPI Working Group, chartered to take the specification to
Recommendation status, since decided to remove them, so as things stand
there won't be means to discover listeners. If you think DOM Level 3
Events should have such facilities, I would appreciate if you could post
your thoughts on this matter to the public-webapi@w3.org mailing list.

Thanks,
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Thursday, 30 March 2006 09:30:48 UTC