This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Any plans do this in the future? It would be useful if we have access to all registered event listeners from context: el.eventListeners << return some array And we can loop through this array, get single event listener (read type, callback, capture with the possibility of changes and one method to remove this event listener totally). If it is completely impossible maybe add to the EventTarget some method to remove all event listeners. Now its not easy... especially when we have a lot of them and some have anonymous callback. We must clone only context, move content, and probably reconstruction some listeners (nothing pleasant). I just wonder if there any chances of a better API for these things or we must use some additional libraries/tricks.
We don't really want to make listeners observable. There's various places in the platform where this has happened anyway, but I'm not planning on giving in just yet. As for a better API, I suggest you discuss that on www-dom@w3.org. This is not really a place for brainstorming.