Closed matthewp closed 7 years ago
@justinbmeyer pointed out that this won't work if the handler is used multiple times.
I think this can be fixed by not wrapping a handler that has already been wrapped (having one wrapped version for each handler function).
can-zone wraps event listeners through
addEventListener
so that the handlers will run within the zone. If someone is to callremoveEventListener
, it will not be removed because a different (wrapped) function is the one that was actually registered.