Re: Custom DOM events and privileged browser add-ons; Was: Bubbling/Capturing for XHR + other non-DOM objects

On Fri, 02 Jul 2010 12:57:08 +0200, Bjoern Hoehrmann <derhoermi@gmx.net>  
wrote:
> * Anne van Kesteren wrote:
>> You have to read DOM Events either way.
>
> Not to answer the particular question. Sure, you might have read the DOM
> Events specification, say, to figure out what Event.currentTarget is but
> what it means when a specification does not define the event flow you'd
> expect it to define is not something that will stick with most readers,
> they will have to consult the specification just to answer the question.

You'd have to read it to figure out what the "event flow" is, for instance.


> (It's worse even, because some readers would not know where to check if
> the XHR specification does not define it, do they have to check the spe-
> cification for the `window` object aswell, or for the individual events,
> considering that the propagation paths sometimes depend on the type of
> event that is being dispatched, and others may jump to the conclusion it
> is left to the implementation or that it's "the same" as with whatever
> they are already familiar with, whatever that is.)
>
> The event flow with respect to some object should always be defined in
> the same place that defines that object to be an EventTarget, there is
> no point in optimizing the one sentence it takes to define it out using
> implicit indirection.

I disagree. Only Node objects have event flow and the Window object  
interacts with those in a particular way. All other objects do not have an  
event flow at all. Optimizing for those other objects makes way more sense.


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Friday, 2 July 2010 11:13:08 UTC