Hi, I don't think there's any standardized way to do that -- e.g., a way that will work for handlers registered using the raw functions of the browser itself.
There's also no documented way to do this for handlers registered via Prototype's Event.observe method -- but you *can* get that information easily enough, because Prototype keeps track of those handlers so it can provide some of the handy features of Event.stopObserving. Delve into the Prototype code and look at the 'cache' var within the Event class. It's keyed by element ID. If you're worried about using the under-the-covers method, you could always wrap Element.observe via Function.wrap[1] and keep your own, duplicate cache. [1] http://prototypejs.org/api/function/wrap HTH, -- T.J. Crowder tj / crowder software / com On Oct 31, 6:17 pm, AOOSdev <[EMAIL PROTECTED]> wrote: > Is there a way to find out all the event listeners assigned to a given > element? > > I'm debugging an app that assigns and removes different event > listeners according to the stage of data entry. It would help > tremendously if I could use a Firebug break point and see what > listeners are currently active. I've looked for attributes of the > element itself, the document and the window; if its there I'm not > seeing it. > > Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
