and yet you haven't removed any anonymous arrow listener. Assign first?
Mostly nobody will do that, it's just less natural then `obj.on(something,
()=>happening)`
personally? Yes, I tend to assign listeners somewhere, at least when I
intend to remove them later. I've even been known to assign them to a
virtual event object, so that I could translate the event names later
(eg, click vs touch). But that is just me.
One could also hide the assignment in an `on` helper (JQuery does
something similar).
function on (obj,event,listener) {
obj._events[event]=listener;
return obj.on(event,listener);
}
Claus
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss