mozilla
Your Search Results

    nsIEventListenerInfo

    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.
    1.0
    28
    Introduced
    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();

    Attributes

    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.

    Methods

    getDebugObject()

    Returns the debugger object if the debug service is active.

    nsISupports getDebugObject();
    
    Parameters

    None.

    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.

    toSource()

    Tries to serialize the event listener to a string.

    AString toSource();
    
    Parameters

    None.

    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++).

    Remarks

    nsIEventListenerInfo was introduced with bugĀ 448602.

    See also

    Document Tags and Contributors

    Contributors to this page: Sheppy, Sevenspade, fscholz
    Last updated by: Sheppy,