Re: variable declarations shadowing named properties on window

On 1/5/12 10:08 PM, Cameron McCormack wrote:
> Only if we want to keep them on window. If we're happy to move them to
> the prototype then we're safe, I believe.

Indeed.

> They can for window.foo but not for bareword lookups. window.foo will do
> a [[Get]], and we could have that return the frame while
> [[GetOwnProperty]] returns undefined. That breaks barewords, though,
> which definitely do use HasBinding and so [[GetOwnProperty]] to
> determine if the reference can be resolved or not.

OK, it sounds like moving this stuff to some proto of the window is the 
way to go, unless we make some more ES spec changes of some sort.

I'm perfectly happy with that, so someone else (who really wants to keep 
the GSP and whatnot on the window) would need to figure out what those 
changes should be and argue for them if they want them to happen.... ;)

-Boris

Received on Friday, 6 January 2012 03:19:23 UTC