[whatwg] Exposing EventTarget to JavaScript

Ojan Vafai ojan at chromium.org
Fri Apr 24 19:36:22 PDT 2009


On Fri, Apr 24, 2009 at 7:26 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:

> Ojan Vafai wrote:
>
>>    If a linear list of things the event is targeting is sufficient, of
>>    course, and we're ok with the random third argument of
>>    addEventListener being carted around, then we might be ok using it...
>>
>> I think this is sufficient. Although it is a bit unfortunate that dispatch
>> order is undefined.
>>
>
> Those are unrelated issues, aren't they?  The linear list I was referring
> to is the proposed parentNode (or equivalent) chain; order there is
> well-defined, presumably.  For each element in this list, one can have
> multiple listeners for the event; the dispatch order here is currently
> undefined, but that could be changed.
>

Sorry, I had misread this.  Although, I think a linear list of things the
event is targeting is sufficient.

Is there a reason that they can't dispatch in a guaranteed order?
>>
>
> You'd probably have to check with the folks who wrote DOM2 Events, if the
> question is why the spec says what it says.
>
> If the question is about current implementations, nothing obvious jumps out
> at me in the one implementation I'm familiar with (Gecko's).
>

Yeah, I'm more interested in implementation difficulties. I can't think of
anything obvious in WebKit's implementation either, but I'm not too familiar
with the event handling code.

Ojan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090424/010267ad/attachment-0002.htm>


More information about the whatwg mailing list