Wednesday, August 31st, 2005blockquote>
The window.onload event handler has two main limits:
- You can attach just one function to it
- The script will wait until the page is fully loaded before running
Alessandro continues to discuss the onload limits and gets some interesting comments from the community:
- Mozilla has a DOMContentLoaded event
- Mark Wubben: Unfortunately sometimes you do need to wait until `onload`. Safari for instance won’t lay out the page correctly until it’s been fully loaded, which means that for sIFR we had to do a special check for Safari so we could replace the elements earlier in other browsers. This problem is comparable to the non-incremental rendering of XHTML pages by Safari and Mozilla.