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 <dhtmlkitc...@gmail.com> wrote: > On Thu, Apr 30, 2009 at 8:57 AM, Boris Zbarsky <bzbar...@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 >