Reflection of global bindings

Mark S. Miller erights at
Mon Dec 17 04:01:56 PST 2012

On Mon, Dec 17, 2012 at 2:03 AM, Andreas Rossberg <rossberg at> wrote:
> On 15 December 2012 22:52, Allen Wirfs-Brock <allen at> wrote:
>> So, to me, it sounds like that to continue down this path we should really add new non-reflected properties attributes that are the real control points for the ES semantics. Eg, we may need [[RealReadOnly]], [[RealDeletable]], and [[RealReconfigurable]] attributes to describe all the states and state transitions that are actually exist within the legacy DOM (and the pure ES global declaration semantics).  As these attributes would not be reflected by Object.getOwnPropertyDescriptor/Object.defineProperty they would have to set in some other internal manner when object instances are created.  Tis also means that Proxy based object implementations would also need to have some mechanism for emulating these "Real" attributes.
> Now I'm really scared. Please let's not go there.
> I see the following preferable solutions to deal with DOM features violating ES:
> 1. Lobby to fix the DOM and make it conform to ES instead of the other
> way round. Alex Russell has argued for this repeatedly.
> 2. Where we can't (sadly, probably most cases), and are forced to
> codify existing DOM hacks in ES, isolate these hacks as much as
> possible. Specifically, in the current case, define them as specifics
> of the global object (the global object is a lost cause anyway).

In general, I might be fine with that approach. But because of direct
proxies, it doesn't work for invariant enforcement. Direct proxies can
use the presence of a single invariant-violating object to create any
number of other invariant-violating objects.

> /Andreas
> _______________________________________________
> es-discuss mailing list
> es-discuss at


More information about the es-discuss mailing list