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

In fact I have got somewhat disgruntled with the sentiment here back then a few years ago, and made a _shim_ a year or so ago, available as `@dorgaren/usable` over at `npm`.

It may not support capture as an options object _properly_, since there is no _simple_ and reliable ES5 way known to me to "hash" an object in a deterministic manner (i.e. without being sensitive to "truthiness", key order, etc.).

But for anyone wishing to do debugging / quick experiments with `hasEventListeners` or even `getEventHandlers` (named differently, due to the syntax not matching the other set of methods), or just have a reasonable event auto-mounting mechanism for attaching event handlers on `DocumentFragment`s and auto-attaching them when the fragment is appended to a document / element, it may be handy whatsoever.



-- 
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/412#issuecomment-886861711

Received on Monday, 26 July 2021 16:47:10 UTC