nsISupports
Last changed in Gecko 7.0 (Firefox 7.0 / Thunderbird 7.0 / SeaMonkey 2.4)Implemented by: @mozilla.org/eventlistenerservice;1
. To create an instance, use:
var eventListenerService = Components.classes["@mozilla.org/eventlistenerservice;1"]
.getService(Components.interfaces.nsIEventListenerService);
UniversalXPConnect privileges are required to use this service.
void getEventTargetChainFor(in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDOMEventTarget aOutArray); |
void getListenerInfoFor(in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIEventListenerInfo aOutArray); |
boolean hasListenersFor(in nsIDOMEventTarget aEventTarget, in DOMString aType); |
void addSystemEventListener(in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); |
void removeSystemEventListener(in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture); |
Attribute | Type | Description |
systemEventGroup |
|
Returns system event group. Read only. Obsolete since Gecko 7.0 |
Returns an array of event targets indicating all the targets that will receive the same events that are delivered to the specified target. aEventTarget
will be at index 0. The objects are the ones that would be used as event.currentTarget
while dispatching an event to aEventTarget
.
void getEventTargetChainFor( in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIDOMEventTarget aOutArray );
aEventTarget
nsIDOMEventTarget
for which to return the event target chain.aCount
aOutArray
Returns an array of nsIEventListenerInfo
objects describing everyone listening to the specified event target. If aEventTarget
doesn't have any listeners, this returns null
.
void getListenerInfoFor( in nsIDOMEventTarget aEventTarget, [optional] out unsigned long aCount, [retval, array, size_is(aCount)] out nsIEventListenerInfo aOutArray );
aEventTarget
nsIEventTarget
for which to obtain a list of listeners.aCount
aOutArray
nsIEventListenerInfo
objects describing the listeners.Returns true if a event target has any listener for the given type.
boolean hasListenersFor( in nsIDOMEventTarget aEventTarget, in DOMString aType );
aEventTarget
nsIDOMEventTarget
for which to check if this has any listener for aType.aType
Add a system-group eventlistener to a event target.
System-group eventlisteners are called after all eventlisteners in default-group handle the events. So, system-group eventlisteners can implement the default action of the event. Even if an event is stopped its propagation in default-group, the event will be fired again in system-group.
void addSystemEventListener(
in nsIDOMEventTarget target,
in DOMString type,
in nsIDOMEventListener listener,
in boolean useCapture
);
target
nsIDOMEventTarget
for the event target to listen an event.type
listener
nsIDOMEventListener
which listens the event.useCapture
Remove a system-group eventlistener from a event target.
void removeSystemEventListener( in nsIDOMEventTarget target, in DOMString type, in nsIDOMEventListener listener, in boolean useCapture );
target
nsIDOMEventTarget
for the event target listening the event.type
listener
nsIDOMEventListener
which is listening the event.useCapture
nsIEventListenerService
was introduced with bug 448602.