raul mihaila (2013-05-03T12:33:05.000Z)
Hi,

In section 15.3.4.3 Function.prototype.apply (thisArg, argArray) (page 119
of Ecma-262, Edition 5.1) there's this note:
'The thisArg value is passed without modification as the this value. This
is a change from Edition 3, where a undefined or null thisArg is replaced
with the global object and ToObject is applied to all other values and that
result is passed as the this value.' From this I understand that this is
happening in both non-strict mode and strict mode.

But in Annex C, one of the bullets says (page 235):
'If this is evaluated within strict mode code, then the this value is not
coerced to an object. A this value of null or undefined is not converted to
the global object and primitive values are not converted to wrapper
objects. The this value passed via a function call (including calls made
using Function.prototype.apply and Function.prototype.call) do not coerce
the passed this value to an object (10.4.3, 11.1.1, 15.3.4.3, 15.3.4.4).'
>From this I understand that the coercion occurs only in non-strict mode
(like in Firefox).

Is it possible to make this clearer in the next edition, please?

Thanks,
Raul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130503/f1bea9df/attachment.html>
github at esdiscuss.org (2013-07-12T02:27:22.257Z)
In section 15.3.4.3 Function.prototype.apply (thisArg, argArray) (page 119
of Ecma-262, Edition 5.1) there's this note:

> The thisArg value is passed without modification as the this value. This
> is a change from Edition 3, where a undefined or null thisArg is replaced
> with the global object and ToObject is applied to all other values and that
> result is passed as the this value.

From this I understand that this is
happening in both non-strict mode and strict mode.

But in Annex C, one of the bullets says (page 235):
> If this is evaluated within strict mode code, then the this value is not
> coerced to an object. A this value of null or undefined is not converted to
> the global object and primitive values are not converted to wrapper
> objects. The this value passed via a function call (including calls made
> using Function.prototype.apply and Function.prototype.call) do not coerce
> the passed this value to an object (10.4.3, 11.1.1, 15.3.4.3, 15.3.4.4).

From this I understand that the coercion occurs only in non-strict mode
(like in Firefox).

Is it possible to make this clearer in the next edition, please?