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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to