Gustaf Forsslund
unread,Dec 9, 2009, 5:21:38 AM12/9/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to DOMAssistant
Hi. I have recently tried to fix some bugs on a banner intensive site
running DOMAssistant. What I realised was that the DOMReady event
sometimes fired far too early i IE (at least IE7). In the end I
modified my own DOMAssistant code (version 2.7.4) by mixing the
original code with Diego Perini's ideas from jQuery (yes, I was in a
hurry - I had to get this to work quick). I have noticed that Diego's
ideas (the try-catch-doScroll-part) also seems to be integrated in the
lastest versions of YUI. So, it might be an idea to bring these into
DOMAssistant as well. Or maybe I am the only one who has experienced
these problems so far.
My code after modifications:
/*@cc_on
@if (@_win32 || @_win64)
document.attachEvent("onreadystatechange", function() {
if (document.readyState === "complete") {
document.detachEvent("onreadystatechange", arguments.callee);
DOMHasLoaded();
}
});
if (document.documentElement.doScroll && window == window.top)
(function() {
if (DOMLoaded) {
return;
}
try {
document.documentElement.doScroll("left");
} catch(error) {
setTimeout(arguments.callee, 0);
return;
}
DOMHasLoaded();
})();
@end @*/