Description
Its possible that addLoadEvent doesn't fire correctly when using IFRAMEs in IE.
On the dev list James have contributed this patch:
if (window == top) {
var d = window.document;
(function () {
try
catch (e)
{ setTimeout(arguments.callee, 50); return; }// Dom is ready, run events
Click.domready.run();
})();
} else {
var d = document;
(function () {
if (d.body==null) { setTimeout(arguments.callee, 50); return; }
// Dom is ready, run events
Click.domready.run();
})();
}
JQuery also uses a similar check whether document.body is null as well as an onreadystatechange event for IFRAMES:
More info can be read here:
http://www.subprint.com/blog/demystifying-the-dom-ready-event-method/
and here (see the bindReady and ready functions):
http://code.jquery.com/jquery-1.4.js