This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree 1 file changed +13
-8
lines changed
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ ( function ( window ) {
4
+
5
+ var zone = null ;
6
+
3
7
4
8
function Zone ( parentZone , data ) {
5
9
var zone = ( arguments . length ) ? Object . create ( parentZone ) : this ;
@@ -79,10 +83,10 @@ Zone.prototype = {
79
83
run : function run ( fn , applyTo , applyWith ) {
80
84
applyWith = applyWith || [ ] ;
81
85
82
- var oldZone = window . zone ,
86
+ var oldZone = zone ,
83
87
result ;
84
88
85
- window . zone = this ;
89
+ window . zone = zone = this ;
86
90
87
91
try {
88
92
this . beforeTask ( ) ;
@@ -95,7 +99,7 @@ Zone.prototype = {
95
99
}
96
100
} finally {
97
101
this . afterTask ( ) ;
98
- window . zone = oldZone ;
102
+ window . zone = zone = oldZone ;
99
103
}
100
104
return result ;
101
105
} ,
@@ -665,13 +669,14 @@ Zone.onEventNames = Zone.eventNames.map(function (property) {
665
669
} ) ;
666
670
667
671
Zone . 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 ( ) ;
673
673
Zone . patch ( ) ;
674
674
} ;
675
675
676
676
677
677
Zone . 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