- From: Anne van Kesteren <notifications@github.com>
- Date: Fri, 08 Apr 2016 04:21:46 -0700
- To: whatwg/dom <dom@noreply.github.com>
Received on Friday, 8 April 2016 11:22:15 UTC
Reportedly when writing components it would be convenient to be able to remove a whole swatch of event listeners through a common identifier, rather than having to enumerate all the specific types and callbacks. I have discussed this a long time ago with @wycats I believe and more recently with @RByers. Now that `addEventListener()` supports a dictionary we could make this a reality. E.g., ```js obj.addEventListener("click", ..., { class: "clicker" }) obj.addEventListener("focus", ..., { class: "clicker" }) obj.removeEventListener({class: "clicker" }) ``` An alternative to overloading `obj.removeEventListener()` would be adding something like `obj.removeEventListenerClass("clicker")`, but that seems less extensible. --- 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/208
Received on Friday, 8 April 2016 11:22:15 UTC