This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
+ ( function ( window ) {
4
+
3
5
4
6
function Zone ( parentZone , data ) {
5
7
var zone = ( arguments . length ) ? Object . create ( parentZone ) : this ;
@@ -118,7 +120,7 @@ Zone.patchSetClearFn = function (obj, fnNames) {
118
120
var ids = { } ;
119
121
120
122
if ( setName === 'setInterval' ) {
121
- zone [ setName ] = function ( fn ) {
123
+ window . zone [ setName ] = function ( fn ) {
122
124
var id ;
123
125
arguments [ 0 ] = function ( ) {
124
126
delete ids [ id ] ;
@@ -130,7 +132,7 @@ Zone.patchSetClearFn = function (obj, fnNames) {
130
132
return id ;
131
133
} ;
132
134
} else {
133
- zone [ setName ] = function ( fn ) {
135
+ window . zone [ setName ] = function ( fn ) {
134
136
var id ;
135
137
arguments [ 0 ] = function ( ) {
136
138
delete ids [ id ] ;
@@ -538,13 +540,14 @@ Zone.onEventNames = Zone.eventNames.map(function (property) {
538
540
} ) ;
539
541
540
542
Zone . init = function init ( ) {
541
- if ( typeof module !== 'undefined' && module && module . exports ) {
542
- module . exports = new Zone ( ) ;
543
- } else {
544
- window . zone = new Zone ( ) ;
545
- }
543
+ window . zone = new Zone ( ) ;
546
544
Zone . patch ( ) ;
547
545
} ;
548
546
549
547
550
548
Zone . init ( ) ;
549
+
550
+ window . Zone = Zone ;
551
+
552
+ } ( ( typeof module !== 'undefined' && module && module . exports ) ?
553
+ module . exports : window ) ) ;
You can’t perform that action at this time.
0 commit comments