W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2000

Re: event registration another way

From: John Ky <hand@syd.speednet.com.au>
Date: Sat, 30 Sep 2000 13:30:35 +1000
Message-ID: <013201c02a8e$cd3ca440$3300a8c0@NEWHOGGY>
To: <www-dom@w3.org>
> Hmm.  That sounds like an optimization to me, and I usually
> hate to see them written into specs.

No ... it isn't an optimisation.  If you want to have the event
fired twice, simply add the same event twice but with different
object identities.

You see - it is possible to achieve two event fires with the
scheme I described.

Considering the "unoptimized" version - It is not possible to
achieve one event fire if addEventListener was called twice.

So rather than being an optimisation - it is really about
providing the most functionality to a wider range of users.
(Or at least that's the way I thought of it at the time I
was designing stackable registration - I kinda like that
name :)

> Actually I'd say it the other way around.  You have to do extra
> work to care about identity.  Someone must clearly have thought
> about this, to write "do extra work" into the spec, and avoid
> using that standard idiom.
> What's the rationale for caring about identity?  Perhaps it's
> to avoid handlers seeing events more than once?

True in a way - but really, as humans we forget, produce
errors or overlook issues no matter how hard we try not

"With enough eyeballs all bugs are shallow" - including
design flaws for that matter.

We really need to push prototype implementations and their
experimental use to the public in order to get good comments.
Which probably includes putting the prototypes into places
where they are or can be used most often by most people
(ie. browsers)

Received on Friday, 29 September 2000 22:31:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC