ECMA TC 39 / W3C HTML and WebApps WG coordination
Allen.Wirfs-Brock at microsoft.com
Fri Sep 25 18:34:49 PDT 2009
>From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
>But ECMAScript doesn't have a way to distinguish normal property
>access from property access via lexical scoping.
In the ES5 specification it does. Reference that that resolve to property accesses
are explicitly distinguished from those that resolve to environment records. This includes
object environments such as the global environment and with environments.
>It's unclear whether
>you could say an object is actually "the same" but happens to give
>different answers for scope chain access and direct property access,
>and possibly even different answers depending on which scope chain it
>was found in. I would think that strains host object exemptions to the
Accesses to the global object are mediated through a object environment record, but the
actual access to the global object's properties take place using "internal methods" [[Get]], [[Put]],
[[DefineOwnProperty]], etc. regardless of whether the access was initiated via a direct
property reference or via an environment record. However, because neither ES3 or ES5 (except for a
only a couple new requirements) really define or require specific semantics for host
object internal methods virtually anything goes. Even behavior that differs depending upon
the "calling context" of the internal method. (although "internal methods" aren't real and
aren't actually called).
When ECMAScript says "host object" it is really saying "arbitrary implementation dependent magic
could happen here.
More information about the es-discuss