This repository was archived by the owner on Feb 26, 2024. It is now read-only.
File tree 1 file changed +17
-15
lines changed
1 file changed +17
-15
lines changed Original file line number Diff line number Diff line change @@ -92,22 +92,24 @@ function patchEventTargetMethods(obj) {
92
92
var addDelegate = obj . addEventListener ;
93
93
obj . addEventListener = function ( eventName , handler ) {
94
94
var fn ;
95
-
96
- if ( handler . handleEvent ) {
97
- // Have to pass in 'handler' reference as an argument here, otherwise it gets clobbered in
98
- // IE9 by the arguments[1] assignment at end of this function.
99
- fn = ( function ( handler ) {
100
- return function ( ) {
101
- handler . handleEvent . apply ( handler , arguments ) ;
102
- } ;
103
- } ) ( handler ) ;
104
- } else {
105
- fn = handler ;
106
- }
95
+ //Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150
96
+ if ( handler . toString ( ) !== "[object FunctionWrapper]" ) {
97
+ if ( handler . handleEvent ) {
98
+ // Have to pass in 'handler' reference as an argument here, otherwise it gets clobbered in
99
+ // IE9 by the arguments[1] assignment at end of this function.
100
+ fn = ( function ( handler ) {
101
+ return function ( ) {
102
+ handler . handleEvent . apply ( handler , arguments ) ;
103
+ } ;
104
+ } ) ( handler ) ;
105
+ } else {
106
+ fn = handler ;
107
+ }
107
108
108
- handler . _fn = fn ;
109
- handler . _bound = handler . _bound || { } ;
110
- arguments [ 1 ] = handler . _bound [ eventName ] = zone . bind ( fn ) ;
109
+ handler . _fn = fn ;
110
+ handler . _bound = handler . _bound || { } ;
111
+ arguments [ 1 ] = handler . _bound [ eventName ] = zone . bind ( fn ) ;
112
+ }
111
113
return addDelegate . apply ( this , arguments ) ;
112
114
} ;
113
115
You can’t perform that action at this time.
0 commit comments