We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8ba5b2b + f62b48b commit 10c9150Copy full SHA for 10c9150
assets/zone.js
@@ -328,13 +328,16 @@ Zone.patchEventTargetMethods = function (obj, thing) {
328
});
329
}
330
331
- arguments[1] = fn._bound = zone.bind(fn, false, ownerInfo);
+ fn._bound = fn._bound || {};
332
+ arguments[1] = fn._bound[eventName] = zone.bind(fn, false, ownerInfo);
333
return Zone._apply(addDelegate, this, arguments);
334
};
335
336
var removeDelegate = obj.removeEventListener;
337
obj.removeEventListener = function (eventName, fn) {
- arguments[1] = arguments[1]._bound || arguments[1];
338
+ if(arguments[1]._bound && arguments[1]._bound[eventName]) {
339
+ arguments[1] = arguments[1]._bound[eventName];
340
+ }
341
var result = Zone._apply(removeDelegate, this, arguments);
342
zone.dequeueTask(fn);
343
return result;
0 commit comments