\href{https://cdnjs.com/libraries/zone.js}{\texttt{ }}

Implements {\itshape Zones} for Java\+Script, inspired by \href{https://dart.dev/articles/archive/zones}{\texttt{ Dart}}.

\begin{quote}
If you\textquotesingle{}re using zone.\+js via unpkg (i.\+e. using {\ttfamily \href{https://unpkg.com/zone.js}{\texttt{ https\+://unpkg.\+com/zone.\+js}}}) and you\textquotesingle{}re using any of the following libraries, make sure you import them first \end{quote}
\begin{quote}
$\ast$ \textquotesingle{}newrelic\textquotesingle{} as it patches global.\+Promise before zone.\+js does
\begin{DoxyItemize}
\item \textquotesingle{}async-\/listener\textquotesingle{} as it patches global.\+set\+Timeout, global.\+set\+Interval before zone.\+js does
\item \textquotesingle{}continuation-\/local-\/storage\textquotesingle{} as it uses async-\/listener 
\end{DoxyItemize}\end{quote}
\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35009}{}\doxysection{NEW Zone.\+js POST-\/v0.\+6.\+0}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35009}
See the new API \href{./lib/zone.ts}{\texttt{ here}}.

Read up on \href{https://docs.google.com/document/d/1F5Ug0jcrm031vhSMJEOgp1l-Is-Vf0UCNDY-LsQtAIY}{\texttt{ Zone Primer}}.\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35010}{}\doxysubsection{What\textquotesingle{}s a Zone?}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35010}
A Zone is an execution context that persists across async tasks. You can think of it as \href{http://en.wikipedia.org/wiki/Thread-local_storage}{\texttt{ thread-\/local storage}} for Java\+Script VMs.

See this video from ng-\/conf 2014 for a detailed explanation\+:

\href{//www.youtube.com/watch?v=3IqtmUscE_U&t=150}{\texttt{ }}\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35011}{}\doxysubsection{See also}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35011}

\begin{DoxyItemize}
\item \href{https://github.com/othiym23/async-listener}{\texttt{ async-\/listener}} -\/ a similar library for node
\item \href{http://www.html5rocks.com/en/tutorials/developertools/async-call-stack/}{\texttt{ Async stack traces in Chrome}}
\item \href{https://github.com/strongloop/zone}{\texttt{ strongloop/zone}} (Deprecated)
\item \href{https://github.com/gilbox/vizone}{\texttt{ vizone}} -\/ control flow visualizer that uses zone.\+js
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35012}{}\doxysubsection{Standard API support}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35012}
zone.\+js patched most standard web APIs (such as DOM events, {\ttfamily XMLHttp\+Request}, ...) and nodejs APIs ({\ttfamily Event\+Emitter}, {\ttfamily fs}, ...), for more details, please see STANDARD-\/\+APIS.md.\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35013}{}\doxysubsection{Nonstandard API support}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35013}
We are adding support to some nonstandard APIs, such as Media\+Query and Notification. Please see NON-\/\+STANDARD-\/\+APIS.md for more details.\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35014}{}\doxysubsection{Examples}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35014}
You can find some samples to describe how to use zone.\+js in SAMPLE.md.\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35015}{}\doxysubsection{Modules}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35015}
zone.\+js patches the async APIs described above, but those patches will have some overhead. Starting from zone.\+js v0.\+8.\+9, you can choose which web API module you want to patch. For more details, please see MODULE.md.\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35016}{}\doxysubsection{Bundles}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35016}
There are several bundles under {\ttfamily dist} folder.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Bundle   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Summary    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Bundle   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Summary    }\\\cline{1-2}
\endhead
zone.\+js   &the default bundle, contains the most used APIs such as {\ttfamily set\+Timeout/\+Promise/\+Event\+Target...}, also this bundle supports all evergreen and legacy (IE/\+Legacy Firefox/\+Legacy Safari) Browsers    \\\cline{1-2}
zone-\/evergreen.\+js   &the bundle for evergreen browsers, doesn\textquotesingle{}t include the {\ttfamily patch} for {\ttfamily legacy} browsers such as {\ttfamily IE} or old versions of {\ttfamily Firefox/\+Safari}    \\\cline{1-2}
zone-\/legacy.\+js   &the patch bundle for legacy browsers, only includes the {\ttfamily patch} for {\ttfamily legacy} browsers such as {\ttfamily IE} or old versions of {\ttfamily Firefox/\+Safari}. This bundle must be loaded after {\ttfamily zone-\/evergreen.\+js}, $\ast$$\ast${\ttfamily zone.\+js}={\ttfamily zone-\/evergreen.\+js} + {\ttfamily zone-\/legacy.\+js}$\ast$$\ast$    \\\cline{1-2}
zone-\/testing.\+js   &the bundle for zone testing support, including {\ttfamily jasmine/mocha} support and {\ttfamily async/fake\+Async/sync} test utilities    \\\cline{1-2}
zone-\/externs.\+js   &the API definitions for {\ttfamily closure compiler}   \\\cline{1-2}
\end{longtabu}


And here are the additional optional patches not included in the main zone.\+js bundles

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Patch   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Summary    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Patch   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ Summary    }\\\cline{1-2}
\endhead
webapis-\/media-\/query.\+js   &patch for {\ttfamily Media\+Query APIs}    \\\cline{1-2}
webapis-\/notification.\+js   &patch for {\ttfamily Notification APIs}    \\\cline{1-2}
webapis-\/rtc-\/peer-\/connection.\+js   &patch for {\ttfamily RTCPeer\+Connection APIs}    \\\cline{1-2}
webapis-\/shadydom.\+js   &patch for {\ttfamily Shady DOM APIs}    \\\cline{1-2}
zone-\/bluebird.\+js   &patch for {\ttfamily Bluebird APIs}    \\\cline{1-2}
zone-\/error.\+js   &patch for {\ttfamily Error Global Object}, supports remove {\ttfamily Zone Stack\+Trace}    \\\cline{1-2}
zone-\/patch-\/canvas.\+js   &patch for {\ttfamily Canvas API}    \\\cline{1-2}
zone-\/patch-\/cordova.\+js   &patch for {\ttfamily Cordova API}    \\\cline{1-2}
zone-\/patch-\/electron.\+js   &patch for {\ttfamily Electron API}    \\\cline{1-2}
zone-\/patch-\/fetch.\+js   &patch for {\ttfamily Fetch API}    \\\cline{1-2}
zone-\/patch-\/jsonp.\+js   &utility for {\ttfamily jsonp API}    \\\cline{1-2}
zone-\/patch-\/resize-\/observer.\+js   &patch for {\ttfamily Resize\+Observer API}    \\\cline{1-2}
zone-\/patch-\/rxjs.\+js   &patch for {\ttfamily rxjs API}    \\\cline{1-2}
zone-\/patch-\/rxjs-\/fake-\/async.\+js   &patch for {\ttfamily rxjs fakeasync test}    \\\cline{1-2}
zone-\/patch-\/socket-\/io.\+js   &patch for {\ttfamily socket-\/io}    \\\cline{1-2}
zone-\/patch-\/user-\/media.\+js   &patch for {\ttfamily User\+Media API}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35017}{}\doxysubsection{Promise A+ test passed}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35017}
\href{https://promisesaplus.com/}{\texttt{ }}\hypertarget{md_sfcode_node_modules_zone_js_README_autotoc_md35018}{}\doxysubsection{License}\label{md_sfcode_node_modules_zone_js_README_autotoc_md35018}
MIT 