getEventListeners

getEventListeners(object)

getEventListeners(object)returns the event listeners registered on the specified object. The return value is an object that contains an array for each registered event type ("click" or "keydown", for example). The members of each array are objects that describe the listener registered for each type. For example, the following lists all the event listeners registered on the document object:

getEventListeners(document);

If more than one listener is registered on the specified object, then the array contains a member for each listener. In the following example, there are two event listeners registered on the #scrollingList element for the "mousedown" event:

results for ""

    No results matching ""