a different approach
Get the onDOMLoaded.js source
The method rely on an XMLHttp request to find the size of the requested URL.
I just send a HEAD request initially (a few bytes), but if the 'Content-Length' is not available
the request is resubmitted with GET method. I know it is slow, the page get transferred twice !!!
No events are used so your events should still work out of the box (I hope). No readyState property
and nearly no browser sniffing except for a difference in the Opera DOM about scripts and styles.
I extensively use the StatusBar to output debug info instead of alerts() which many times obfuscate
the real problems and/or may give false result due to the syncronous nature of the alert() function
that will completely stop the currently running browser process, invalidating results especially
during events phases.
NOTES:
This is experimental, many combinations have not been tested yet.
Page sizes and/or slow link combined may reveal bugs/inconsistency.
Please bear with me while I test it and try to make it reliable.
Your comments are strongly appreciated.