Re: capturing load events III

Before you continue the discussion, please read the specification.  
Hallvord gave you the relevant links.
The DOM 2 Events is dated of November 2000  
(http://www.w3.org/TR/DOM-Level-2-Events/), over 6 years ago, and ever  
since Gecko never supported capturing event listeners. This introduced the  
enormeous amount of problems with websites that declare capturing event  
listeners out of mistake, causing major compatibiilty problems for Opera  
because it followed the specification. The Safari team also had the  
behaviour implemented, but had to disable it due to the problem caused by  
the Gecko implementation. Now the bug was fixed, and should be shipped  
with Gecko 1.9, by the end of 2007 with FF3. So meanwhile Mozilla can make  
use of public test build, and tech envagelism to raise awareness to  
developers of the changes intriduced in their reindering engine, which  
would cause regressions with websites.

Again, the specification is clear. If you want to listen for the document  
load, use false as the third parameter because it's the only load event  
that bubbles. All others don't, but they have their capturing phase, which  
obviously fires capturing event listeners.
If you need a drawing, here's one
http://www.w3.org/TR/DOM-Level-3-Events/events.html#Events-flow

Opera implements this behaviour right, IE doesn't not support any kind of  
event capture due to limitation of its event model, Gecko always had the  
bug that got fixed.

However Bjoern Hoehrmann said that the Window specification defends that  
event listeners registered in the window will only be fired for load  
events dispatched to the window, which means none. This could be changes  
to allow bubbling of load event. Is this assumption extrapolated from the  
original dom events specification, or already distorted to emulate Gecko ?



Master Br <master@sitesbr.net> escreveu:

>
> If the DOM specs say something that is against the good sense (I have  
> got some messages saying that the only browser that follows strictly the  
> DOM specs is exactly
> the one that shows the worst behavior: it has the window load event  
> fired every time a children load event occurs and is BLIND to actual  
> children load events added by script for those children) I think that  
> this DOM spec has something wrong and should be reviewed.
> I believe that DOM specs should exist for making web programming more  
> productive and giving us more useful resources, so for this point I  
> believe that Gecko approach should be used to define this DOM spec, as  
> it showed to be more useful and makes more sense.
>
>

Received on Thursday, 28 December 2006 18:37:30 UTC