## org.w3c.dom.events
Interface EventListener

All Known Implementing Classes:
  AccesskeyTimingSpecifier, BridgeContext.DOMAttrModifiedEventListener, BridgeContext.DOMCharacterDataModifiedEventListener, BridgeContext.DOMMouseOutEventListener, BridgeContext.DOMMouseOverEventListener, BridgeContext.DOMNodeInsertedEventListener, BridgeContext.DOMNodeRemovedEventListener, BridgeEventSupport.GVTUnloadListener, ContentManager.ContentElementDOMAttrModifiedEventListener, ContentManager.DOMAttrModifiedEventListener, ContentManager.DOMNodeInsertedEventListener, ContentManager.DOMNodeRemovedEventListener, ContentManager.DOMSubtreeModifiedEventListener, ContentManager.ShadowTreeNodeInsertedListener, ContentManager.ShadowTreeNodeRemovedListener, ContentManager.ShadowTreeSubtreeModifiedListener, CSSEngine.DOMAttrModifiedListener, CSSEngine.DOMCharacterDataModifiedListener, CSSEngine.DOMNodeInsertedListener, CSSEngine.DOMNodeRemovedListener, CSSEngine.DOMSubtreeModifiedListener, DefaultXBLManager.DefAttrListener, DefaultXBLManager.DefNodeInsertedListener, DefaultXBLManager.DefNodeRemovedListener, DefaultXBLManager.DocInsertedListener, DefaultXBLManager.DocRemovedListener, DefaultXBLManager.DocSubtreeListener, DefaultXBLManager.ImportAttrListener, DefaultXBLManager.ImportInsertedListener, DefaultXBLManager.ImportRemovedListener, DefaultXBLManager.ImportSubtreeListener, DefaultXBLManager.RefAttrListener, DefaultXBLManager.TemplateMutationListener, DOMViewer.Panel.AttributeModificationHandler, DOMViewer.Panel.CapturingClickHandler, DOMViewer.Panel.CharDataModificationHandler, DOMViewer.Panel.NodeInsertionHandler, DOMViewer.Panel.NodeRemovalHandler, EventbaseTimingSpecifier, FocusManager.DOMFocusInTracker, FocusManager.DOMFocusOutTracker, FocusManager.MouseClickTracker, FocusManager.MouseOutTracker, FocusManager.MouseOverTracker, JSVGCanvas.ToolTipModifier, RepeatTimingSpecifier, ScriptingEnvironment.DOMAttrModifiedListener, ScriptingEnvironment.DOMNodeInsertedListener, ScriptingEnvironment.DOMNodeRemovedListener, ScriptingEnvironment.ScriptingEventListener, SVG12BridgeContext.EventListenerWrapper, SVG12FocusManager.DOMFocusInTracker, SVG12FocusManager.MouseClickTracker, SVG12FocusManager.MouseOutTracker, SVG12FocusManager.MouseOverTracker, SVG12ScriptingEnvironment.DOMAttrModifiedListener, SVG12ScriptingEnvironment.DOMNodeInsertedListener, SVG12ScriptingEnvironment.DOMNodeRemovedListener, SVG12ScriptingEnvironment.HandlerScriptingEventListener, SVG12TextElementBridge.DOMChildNodeRemovedEventListener, SVG12TextElementBridge.DOMSubtreeModifiedEventListener, SVGAElementBridge.AnchorListener, SVGAElementBridge.CursorMouseOutListener, SVGAElementBridge.CursorMouseOverListener, SVGFlowRootElementBridge.RegionChangeListener, SVGImageElementBridge.ForwardEventListener, SVGOMDocument.DOMAttrModifiedListenerWrapper, SVGOMDocument.DOMCharacterDataModifiedListenerWrapper, SVGOMDocument.DOMNodeInsertedListenerWrapper, SVGOMDocument.DOMNodeRemovedListenerWrapper, SVGOMDocument.DOMSubtreeModifiedListenerWrapper, SVGOMStyleElement.DOMCharacterDataModifiedListener, SVGTextElementBridge.DOMChildNodeRemovedEventListener, SVGTextElementBridge.DOMSubtreeModifiedEventListener, SVGUseElementBridge.CursorMouseOverListener, SVGUseElementBridge.ReferencedElementMutationListener

    public interface EventListener

The `EventListener` interface is the primary way for handling events. Users implement the `EventListener` interface and register their event listener on an `EventTarget`. The users should also remove their `EventListener` from its `EventTarget` after they have completed using the listener.

Copying a `Node`, with methods such as `Node.cloneNode` or `Range.cloneContents`, 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` , `Node.appendChild`, or `Range.extractContents`, does not affect the event listeners attached to it.

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

Since:
  DOM Level 2

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

Method Detail

### handleEvent

    void handleEvent(Event evt)

  This method is called whenever an event occurs of the event type for which the `EventListener` interface was registered.

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

Copyright © 2008 Apache Software Foundation. All Rights Reserved.