This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ ( function ( window ) {
4+
5+ var zone = null ;
6+
37
48function Zone ( parentZone , data ) {
59 var zone = ( arguments . length ) ? Object . create ( parentZone ) : this ;
@@ -79,10 +83,10 @@ Zone.prototype = {
7983 run : function run ( fn , applyTo , applyWith ) {
8084 applyWith = applyWith || [ ] ;
8185
82- var oldZone = window . zone ,
86+ var oldZone = zone ,
8387 result ;
8488
85- window . zone = this ;
89+ window . zone = zone = this ;
8690
8791 try {
8892 this . beforeTask ( ) ;
@@ -95,7 +99,7 @@ Zone.prototype = {
9599 }
96100 } finally {
97101 this . afterTask ( ) ;
98- window . zone = oldZone ;
102+ window . zone = zone = oldZone ;
99103 }
100104 return result ;
101105 } ,
@@ -665,13 +669,14 @@ Zone.onEventNames = Zone.eventNames.map(function (property) {
665669} ) ;
666670
667671Zone . init = function init ( ) {
668- if ( typeof module !== 'undefined' && module && module . exports ) {
669- module . exports = new Zone ( ) ;
670- } else {
671- window . zone = new Zone ( ) ;
672- }
672+ window . zone = zone = new Zone ( ) ;
673673 Zone . patch ( ) ;
674674} ;
675675
676676
677677Zone . init ( ) ;
678+
679+ window . Zone = Zone ;
680+
681+ } ( ( typeof module !== 'undefined' && module && module . exports ) ?
682+ module . exports : window ) ) ;
You can’t perform that action at this time.
0 commit comments