is the DOM ready yet?
This post ( Order of Events @ dean.edwards.name) addresses the need for a better solution than window.onload for DOM scripting. window.onload only fires after *all* the content on a page (including images) has loaded.. which is frequently significantly after the page has appeared in the browser. Mozilla/Firefox apparenly have the little known "DOMContentLoaded" event. Very handy. Windows IE has the readyState (or, better, the also little known ondocumentready event. Take this and brothercake's domFunction and there's a cross-browser solution in there awaiting the motivated developer.
1 Comments:
Here's something I'm playing with: (DOM) runWhenReady. It includes a message stack that gets inserted asap, and further appended to as events check in.
<< Home