[Javascript] Onload event handlers for Safari

Guillaume javascript at webdesignofficina.com
Wed Aug 30 04:47:36 CDT 2006


Nick thank you for this nice and clear clarification...

> On 29 Aug 2006, at 16:46, Guillaume wrote:
>
>> I've come across this link apparently solving a long time problem  
>> with onload event handlers for Safari...
>>
>> Reading articles about the onload event handlers for Safari, it  
>> seems this browser behaves differently than Ie and Mozilla...
>> Here's a ressource that might help us on Den Edwards's site in an  
>> article called: window.onload (again)
>> http://dean.edwards.name/weblog/2006/06/again/
>>
>
> What Dean's (and others') technique does is allow one to start one's  
> script when the page has been _parsed_ into a DOM, which is not the  
> same thing as when it has _loaded_. This means that (assuming you  
> don't try to do too much) you can get all your initialisation in  
> place before the page is displayed to the user, and long before the  
> onload event fires.


For Safari only... ? Or is this true also for Mozilla and Opera ?

>
> It's a useful technique which handles one of the most important  
> problems in DOM scripting (in fact, we discussed it at some length  
> over a year ago at a get-together in London [1] which led to the  
> founding of the Web Standards Project's DOM Scripting Task Force  
> [2]). But it shouldn't be confused with onload event handling,  
> despite Dean's title; it's to do with the DOMContentLoaded event, to  
> use the Mozilla name for it, and how that can be emulated in IE and  
> Safari.
>
> Footnotes:
> [1] <http://www.nickfitz.co.uk/2005/06/13/javascript-get-together- 
> london-2005-06-11/>
> [2] <http://webstandards.org/action/dstf/>
>
> Cheers,
>
> Nick.


Regards.

Guillaume.






More information about the Javascript mailing list