Re: [whatwg/dom] [Proposal] Add EventTarget.getEventListeners() (#412)

I don't think an opt-in new method would work (if the listener-adding code follow the same "contract" as the listener-reading code they can just use a helper, most use cases for `getEventListeners()` are about doing stuff with listeners you did not attach yourself), but what about an opt-out? I'd wager that _most_ event listeners exist to enable functionality and don't care one iota about encapsulation. For the ones that do, there could be something like `addEventListener(eventName, callback, {closed: true})` 

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

Message ID: <whatwg/dom/issues/412/1063107025@github.com>

Received on Wednesday, 9 March 2022 16:24:09 UTC