Firefox4でECMAScript5のStrict mode

ココによるとFirefox4(現在4.0b8)で対応してるみたいなんで試してみる。

> function test() {
    "use strict";
    a = 1;
}
undefined
> test();
ReferenceError: assignment to undeclared variable a

> function test() {
    "use strict";
    this.a = 1;
}
undefined
> test();
TypeError: this is undefined

> function test() {
    "use strict";
    var o = {a: 1, a: 2};
}
SyntaxError: property name a appears more than once in object literal

> function test() {
    "use strict";
    with ({}) {
        console.log("Hello");
    }
}
SyntaxError: strict mode code may not contain 'with' statements