Re: [whatwg/dom] Allow removing event listeners by group (#469)

domenic commented on this pull request.



> @@ -325,10 +325,23 @@ function imgFetched(ev) {
 }
 </pre>
 
-<a>Event listeners</a> can be removed
-by utilizing the
-{{EventTarget/removeEventListener()}}
-method, passing the same arguments.
+<a>Event listeners</a> can be removed by utilizing the
+{{EventTarget/removeEventListener(type, callback, options)}} method, passing the same arguments.
+
+Once can also provide a <em>group</em> when adding an <a>event listener</a>. This can be any value,
+including a simple string. Then later, the same group value can be provided to
+{{EventTarget/removeEventListener(type, options)}} or {{EventTarget/removeEventListener(options)}},
+to remove all event listeners in that group:
+
+<pre class=lang-javascript>
+oven.addEventListener("turnon", () => { &hellip; }, { group: "cookies" })

Thanks. Will make it brownies instead during the next revision.

-- 
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/pull/469#discussion_r124404219

Received on Tuesday, 27 June 2017 21:44:24 UTC