W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2009

[whatwg] Exposing EventTarget to JavaScript

From: Alex Russell <slightlyoff@google.com>
Date: Thu, 30 Apr 2009 16:49:29 -0700
Message-ID: <6fc58d0d0904301649y5bedf512m5b426f508aafd075@mail.gmail.com>
See earlier comment about dispatching from an "internal" list in order
to gaurantee order. Some libraries may do undefined things....good
libraries should not ;-)

On Thu, Apr 30, 2009 at 9:12 AM, Garrett Smith <dhtmlkitchen at gmail.com> wrote:
> On Thu, Apr 30, 2009 at 8:57 AM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
>> Stewart Brodie wrote:
>>>
>>> Actually, it is defined. ?They are called in registration order, from
>>> oldest
>>> to newest. ?This is stated in both the latest D3E working draft, and the
>>> older versions dating back to 2003 (at least - I didn't go back any
>>> further)
>>
>> Perhaps I should have been clearer. ?It's not defined in DOM2 Events, which
>> is what browsers implement in practice. ?I'm not aware of any browser at
>> this point that's even trying to track the DOM3 Events drafts, yet.
>>
>
> IE's attachEvent does not guarantee order, either.
> | If you attach multiple functions to the same event on the
> | same object, the functions are called in random order,
> | immediately after the object's event handler is called.
>
> http://msdn.microsoft.com/en-us/library/ms536343(VS.85).aspx
>
> Many event registration objects (the javascript libraries) use a
> combination of addEventListener and attachEvent, where available, so
> order could not be expected to be consistent, between objects (custom
> object) or browser.
>
> Garrett
>
Received on Thursday, 30 April 2009 16:49:29 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:11 UTC