Revision: 3635
Author: erights
Date: Wed Aug 5 15:38:54 2009
Log: Edited wiki page through web user interface.
http://code.google.com/p/google-caja/source/detail?r=3635
Modified:
/wiki/GlobalScopeViaThis.wiki
=======================================
--- /wiki/GlobalScopeViaThis.wiki Thu Apr 23 13:26:00 2009
+++ /wiki/GlobalScopeViaThis.wiki Wed Aug 5 15:38:54 2009
@@ -12,7 +12,7 @@
When javascript is executing in multiple frames, it may be hard to
determine whether an object is a global scope.
-!EcmaScript 3.1 and 4.0 are changing the reflective
{{{myFunction.{call,apply}}}} methods to not coerce null to the global
scope in strict mode. Technically, {{{this}}} is null when null is passed
to {{{call}}} or {{{apply}}} but when code references {{{this}}}, the
global object is substituted for {{{null}}} or {{{undefined}}}. In strict
mode, the interpreter will raise an error instead.
+!EcmaScript 5 changes the reflective {{{myFunction.{call,apply}}}} methods
to not coerce null to the global scope in strict mode. Technically,
{{{this}}} is null when null is passed to {{{call}}} or {{{apply}}} but
when code references {{{this}}}, the global object is substituted for
{{{null}}} or {{{undefined}}}. In strict mode, the interpreter will not
perform this coercion.
==Assumptions==