Re: variable declarations shadowing named properties on window

On 1/4/12 5:53 PM, Ojan Vafai wrote:
> TL;DR: It's fine for "var x" to shadow ids/names, but not override
> existing global variables.

Yes, except per current WebIDL spec they look identical to the code 
that's supposed to implement var, afaict.

I agree that we don't want to override actual page-defined global variables.

That means that the ids/names/frame-names/whatever probably need to not 
be own properties on the global if we want var to override them.

> I expect that for web compat "var x" needs to not
> override existing global variables.

I expect so too.

-Boris

Received on Thursday, 5 January 2012 01:03:39 UTC