canjs / can-zone

A context for tracking asynchronous activity in JavaScript applications.
https://v4.canjs.com/doc/can-zone.html
MIT License
92 stars 4 forks source link

Make sure wrapped event handler is created only once #146

Closed matthewp closed 7 years ago

matthewp commented 7 years ago

This makes sure that we only create the zone-wrapped event handler once, so that using the same handler in multiple events won't result in new handlers getting created (which could lead to memory leaks if removeEventListener is later called).

Closes #144