Re: event registration another way

> 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
to.

"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)

-John

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