[whatwg] Exposing EventTarget to JavaScript
Garrett Smith
dhtmlkitchen at gmail.com
Thu Apr 30 09:12:21 PDT 2009
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
More information about the whatwg
mailing list