Re: Adding an interface to provide a list of listeners

27.07.2014, 15:28, "Anne van Kesteren" <annevk@annevk.nl>:
>> šAnd that search turns up almost a quarter-of-a-million results. The top
>> šresults are quite relevant to this discussion and also demonstrate that many
>> špeople are looking for such a thing. šThe fact is, the browsers themselves
>> šalready have this, but it isn't exposed in a way that devs can get to.
>
> The reasoning is that listeners are observers and adding one should
> not have side effects. Exposing listeners leads to abuse.

Cloning the original element and replacing it with the clone (a workaround typically used currently to remove listeners) is probably worse than a possible standard way to expose listeners to allow legitimate direct removal of just listeners without such unneeded (and probably at least slower) workarounds.

Received on Sunday, 27 July 2014 17:09:25 UTC