[whatwg/dom] Removing event listeners through an identifier (#208)

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