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
. |