\section{DOM::Event\-Listener Class Reference}
\label{classDOM_1_1EventListener}\index{DOM::EventListener@{DOM::EventListener}}
Introduced in {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} Level 2.  


{\tt \#include $<$dom2\_\-events.h$>$}

\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf handle\-Event} ({\bf Event} \&evt)
\begin{CompactList}\small\item\em This method is called whenever an event occurs of the type for which the {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} interface was registered. \item\end{CompactList}\item 
virtual {\bf DOMString} {\bf event\-Listener\-Type} ()\label{classDOM_1_1EventListener_a3}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
Event\-Listener\-Impl $\ast$ {\bf impl}\label{classDOM_1_1EventListener_p0}

\end{CompactItemize}


\subsection{Detailed Description}
Introduced in {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} Level 2. 

The {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} interface is the primary method for handling events. Users implement the {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} interface and register their listener on an Event\-Target using the Add\-Event\-Listener method. The users should also remove their {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} from its Event\-Target after they have completed using the listener.

When a {\bf Node}{\rm (p.\,\pageref{classDOM_1_1Node})} is copied using the clone\-Node method the Event\-Listeners attached to the source {\bf Node}{\rm (p.\,\pageref{classDOM_1_1Node})} are not attached to the copied {\bf Node}{\rm (p.\,\pageref{classDOM_1_1Node})}. If the user wishes the same Event\-Listeners to be added to the newly created copy the user must add them manually. 



Definition at line 68 of file dom2\_\-events.h.

\subsection{Member Function Documentation}
\index{DOM::EventListener@{DOM::Event\-Listener}!handleEvent@{handleEvent}}
\index{handleEvent@{handleEvent}!DOM::EventListener@{DOM::Event\-Listener}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Event\-Listener::handle\-Event ({\bf Event} \& {\em evt})\hspace{0.3cm}{\tt  [virtual]}}\label{classDOM_1_1EventListener_a2}


This method is called whenever an event occurs of the type for which the {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} interface was registered. 

Parameters

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em evt}]The {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} contains contextual information about the event. It also contains the stop\-Propagation and prevent\-Default methods which are used in determining the event's flow and default action. \end{description}
\end{Desc}


Definition at line 38 of file dom2\_\-events.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
dom2\_\-events.h\item 
dom2\_\-events.cpp\end{CompactItemize}
