Re: Better event listeners

On Fri, Jan 11, 2013 at 4:30 PM, Glenn Maynard <glenn@zewt.org> wrote:
> (Just sanity checking: you're getting my mail, right?  I mentioned this
> early in the thread.)

Yeah. I just mentioned it because apparently Jonas had not seen that.


> On Fri, Jan 11, 2013 at 7:33 AM, Anne van Kesteren <annevk@annevk.nl> wrote:
>> What future headaches? As I said before, thus far we never found a
>> need to expand this kind of API. See setInterval(),
>> addEventListener(), ...
>
> setInterval is orders of magnitude simpler API than DOM events, so it isn't
> a useful comparison.  I don't understand the reference to addEventListener
> (events are exactly what we're talking about expanding on right now).

It is a useful comparison as it's the same kind of problem: adding and
removing a callback. It seems you trimmed down too much here, it gave
the reasons for why an object is problematic.


> I've already given an example of something else this API might do in the
> future, based on an actual, live API.
> http://prototypejs.org/doc/latest/dom/Event/Handler/prototype/start/index.html

Is it in use?


-- 
http://annevankesteren.nl/

Received on Friday, 11 January 2013 15:38:53 UTC