|
From: <cam...@ya...> - 2001-01-12 14:03:37
|
Hi, I just noticed some redundancy in LoadPanel.
If you look at the following code, you will see that
the onload event handler is set and removed twice on
two different objects. I tried commenting out both of
them, and found one of them didn't get fired at all.
I've commented out the redundant ones in the code
snipet below. I've tested this in NS4.76 on PC and
Mac, using ILayer and IFrame.
Might be worth updating this in CVS.
LoadQueue.prototype.loadNext = function() {
... snip ...
if (is.ns4) {
DynAPI.document.releaseMouseEvents();
var lyr=lpanel.elm;
while(lyr.parentLayer!=window)
lyr=lyr.parentLayer;
lyr.onload=LoadQueue.loadHandler;
//lpanel.loadElement.onload=LoadQueue.loadHandler;
// redundant
lpanel.loadElement.src=url;
}
.... snip ....
};
LoadQueue.loadHandler = function(e) {
.... snip ....
if (is.ns4) {
var lyr = lp.elm;
while(lyr.parentLayer != window) lyr =
lyr.parentLayer;
lyr.onload = function(){};
//lp.loadElement.onload = function(){};
//redundant
}
.... snip ....
__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/
|