Changes to Array method this coercion (was: ES3.1 Draft: 27 Oct 2008 version available)
david.hopwood at industrial-designers.co.uk
Mon Oct 27 16:54:58 PDT 2008
Robert Sayre wrote:
> I checked current browser behavior for this coercion to the global
> object for array methods (as well as apply and call).
> Opera 9.61
> Chrome Beta 1
> Safari 3.1.2
> Firefox 3.0.3
> It seems that the above implementations coerce null or undefined to
> the global object for Array.map in this example, so Mozilla opposes
> these changes.
The change in behaviour was quite deliberate, and I had been under the
impression there was a concensus in favour of it. Removing the coercion
of 'this' to the global object is necessary to improve the safety and
security of ES3.1, IMHO.
More information about the Es-discuss