This is an archived page. It's not actively maintained.


An instance of this interface describes how an event listener was added to an event target; these are returned by nsIEventListenerService.getListenerInfoFor, which provides a list of all the listeners to a given event target.
Gecko 1.9.2
Inherits from: nsISupports Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0)

Method overview

nsISupports getDebugObject();
AString toSource();


Attribute Type Description
allowsUntrusted boolean Indicates whether or not the event listener allows untrusted events. Read only.
capturing boolean Indicates whether or not the event listener is in capture mode. Read only.
inSystemEventGroup boolean Indicates whether or not the event listener is in the system event group. Read only.
type AString The type of the event for which the listener was added. Read only.



Returns the debugger object if the debug service is active.

nsISupports getDebugObject();


Return value

If jsdIDebuggerService is active and the listener is implemented in JS, this returns the listener as a jsdIValue. Otherwise null. This is the method you should use if you want to get access to the actual listener, but the debugger service must be already active, which significantly slows down script execution. Accordingly, this should probably only be used by real debuggers. This approach is necessary because event listeners added with addEventListener won't necessarily be nsIEventListeners; the DOM code will fix up ordinary JavaScript functions to act as listeners.


Tries to serialize the event listener to a string.

AString toSource();


Return value

Returns a string describing the event listener, or null if serialization isn't possible (for example, if the listener was written in C++).


nsIEventListenerInfo was introduced with bug 448602.

See also