- fix performance of getElementById wrapper for IE (don't look over all elements if initial getElementById returns no element

)
release-0.6
alecpl 15 years ago
parent 5d04a85924
commit 27480b4a02

@ -598,13 +598,14 @@ if (bw.ie)
document._getElementById = document.getElementById;
document.getElementById = function(id)
{
var i = 0;
var o = document._getElementById(id);
var i = 0, obj = document._getElementById(id);
if (!o || o.id != id)
while ((o = document.all[i]) && o.id != id)
if (!obj || obj.id == id)
return obj;
while ((obj = document.all[i]) && obj.id != id)
i++;
return o;
return obj;
}
};

Loading…
Cancel
Save