org.w3c.dom.events
Interface EventListener


public interface EventListener

The EventListener interface is the primary method for handling events. Users implement the EventListener interface and register their listener on an EventTargetEventListener from its EventTarget after they have completed using the listener.

Copying a Node with the Node.cloneNode method does not copy the event listeners attached to it. Event listeners must be attached to the newly created Node afterwards if so desired.

Moving a Node, with methods Document.adoptNode or Node.appendChild, does not affect the event listeners attached to it.

The EventListener behavior follows the description in section 1.2.2 of the DOM Level 3 Events specification.

See also the Document Object Model (DOM) Level 3 Events Specification and .

Since:
DOM Level 2

Method Summary
 void handleEvent(Event evt)
          This method is called whenever an event occurs of the type for which the EventListener interface was registered.
 

Method Detail

handleEvent

public void handleEvent(Event evt)
This method is called whenever an event occurs of the type for which the EventListener interface was registered.

Parameters:
evt - The Event contains contextual information about the event.


Copyright © 2000,2004 World Wide Web Consortium (W3C). See the Copyright Notice for details.