The "if...in" structure is common in MochiKit (and most other JS kits),
but I'm having a distinct problem with certain common IE version six
browsers puking whle parsing something like this:

if ("foo" in obj) {
   someFunc();
}

It always gives a Runtime Error complaining about an expected closing
paren. ')'

I have a simple test as follows:

(function () {
        var allScripts = {};
                var i;
                alert(typeof(window["allScripts"]));
                var uri = 'wombat.js';
                if (1 == 2) {
                if ( uri in allScripts ) {
                                alert("In");
                }
                }
                alert('done');
    })();


This is included in a basically empty html file and dies on "if ( uri
in allScripts ) {"

This is IE 6 on W2k and XP. I can provide specifics if needed, but I'm
hoping one of you can point me in a direction for testing? Tactics to
try? Alternate syntax?

Has anyone else seen this?

Thanks.

Reply via email to