No subject
Sun Dec 8 17:39:16 PST 2013
The `thisArg` value is passed without modification as the `this` value. Thi=
s is a change from Edition 3, where a `undefined` or `null` `thisArg` is re=
placed with the global object and `ToObject` is applied to all other values=
and that result is passed as the `this` value.
It seems like modern engines still have the ES3 behavior:
function foo() {
console.log(this);
return this;
};
foo.call(undefined) =3D=3D=3D undefined; // `false`, expected `true`
I=E2=80=99ve tested this in Spidermonkey/Firefox, Carakan/PrestOpera, JSC/S=
afari, and v8/Chrome. They all show FAIL in this test case:
data:text/html,<script>function foo() { console.log(this); return this; =
}; document.write(foo.call(undefined) =3D=3D=3D undefined %3F 'PASS' %3A 'F=
AIL');</script>
Is this=E2=80=A6
1. a wilful violation of the ES5 spec for back-compat reasons, or=E2=80=A6
2. is it just an oversight that this never got implemented, or=E2=80=A6
3. am I misreading the spec?
If 2 is the case, please fix this :)
--=20
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=3Demail
------- You are receiving this mail because: -------
You are the assignee for the bug.=
More information about the webkit-unassigned
mailing list