-
public interface EventListener
TheEventListener
interface is the primary method for handling events. Users implement theEventListener
interface and register their listener on anEventTarget
using theAddEventListener
method. The users should also remove theirEventListener
from itsEventTarget
after they have completed using the listener.When a
Node
is copied using thecloneNode
method theEventListener
s attached to the sourceNode
are not attached to the copiedNode
. If the user wishes the sameEventListener
s to be added to the newly created copy the user must add them manually.See also the Document Object Model (DOM) Level 2 Events Specification.
- Since:
- DOM Level 2
-
-
Method Summary
Methods Modifier and Type Method and Description void
handleEvent(Event evt)
This method is called whenever an event occurs of the type for which theEventListener
interface was registered.
-
-
-
Method Detail
-
handleEvent
void handleEvent(Event evt)
This method is called whenever an event occurs of the type for which theEventListener
interface was registered.- Parameters:
evt
- TheEvent
contains contextual information about the event. It also contains thestopPropagation
andpreventDefault
methods which are used in determining the event's flow and default action.
-
-
Document created the 11/06/2005, last modified the 04/03/2020
Source of the printed document:https://www.gaudry.be/en/java-api-rf-org/w3c/dom/events/eventlistener.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.