Re: [whatwg/dom] Owned weak event listener to prevent memory leak (using EventListenerOptions) (#243)

I get the intent and the goal here, but I think the approach adds a level of assumption that may not be worth implementing, especially for, imo, is such a small use case. This also makes it easy to lead to bad practices, which is already easy to do in the world of JavaScript, unfortunately. :)

I guess my point here is that removing listeners when they are added should be required always if the desire is to prevent memory leaks. It sounds like your intent here is to have to write less code, which is arguable of whether thats a good enough reason. Regardless of the reason though, I think your code should at the very minimum require an engineer to explicitly opt-in for this functionality, rather than assume that an engineer wants it, similarly to [WeakMap](http://www.ecma-international.org/ecma-262/6.0/#sec-weakmap-constructor) or [WeakSets](http://www.ecma-international.org/ecma-262/6.0/#sec-weakset-objects).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/243#issuecomment-217806746

Received on Monday, 9 May 2016 08:37:48 UTC