I have isolated the problem, now what (if anything) can I do about it?
Here are the details:
Given the following two example functions,
function test1() {
var allScripts = {a:'foo',wombat:'bar'};
var uri = 'wombat';
for (var k in allScripts) {
if ( (k == uri) ) {
alert("Field found");
}
}
}
function test2() {
var allScripts = {a:'foo',wombat:'bar'};
var uri = 'wombat';
if ( uri in allScripts ) {
alert("Field Found");
}
}
test1(); <!-- no errors -->
test2(); <!-- Serious errors -->
The "if (field in object)" syntax is used everywhere in MochiKit, but
won't run on the most recently updated Win2k IE. (IE Version
6.0.2800.1106, SP1 Q823353, Q903235) which is (sadly) the majority of
our machines here.
Suggestions? I don't want to give up Mochikit.