\hypertarget{md_sfcode_node_modules_custom_event_README_autotoc_md7757}{}\doxysubsection{Cross-\/browser $<$tt$>$\+Custom\+Event$<$/tt$>$ constructor}\label{md_sfcode_node_modules_custom_event_README_autotoc_md7757}
\href{https://saucelabs.com/u/custom-event}{\texttt{ }}

\href{https://travis-ci.org/webmodules/custom-event}{\texttt{ }}

\href{https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent.CustomEvent}{\texttt{ https\+://developer.\+mozilla.\+org/en-\/\+US/docs/\+Web/\+API/\+Custom\+Event.\+Custom\+Event}}\hypertarget{md_sfcode_node_modules_custom_event_README_autotoc_md7758}{}\doxysection{Installation}\label{md_sfcode_node_modules_custom_event_README_autotoc_md7758}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install custom-\/event }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_custom_event_README_autotoc_md7759}{}\doxysection{Example}\label{md_sfcode_node_modules_custom_event_README_autotoc_md7759}

\begin{DoxyCode}{0}
\DoxyCodeLine{var CustomEvent = require('custom-\/event');}
\DoxyCodeLine{}
\DoxyCodeLine{// add an appropriate event listener}
\DoxyCodeLine{target.addEventListener('cat', function(e) \{ process(e.detail) \});}
\DoxyCodeLine{}
\DoxyCodeLine{// create and dispatch the event}
\DoxyCodeLine{var event = new CustomEvent('cat', \{}
\DoxyCodeLine{  detail: \{}
\DoxyCodeLine{    hazcheeseburger: true}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\});}
\DoxyCodeLine{target.dispatchEvent(event); }

\end{DoxyCode}
 