W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2012

Re: "var" declarations shadowing properties from Window.prototype

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sun, 12 Aug 2012 17:02:53 -0400
Message-ID: <502819FD.9060307@mit.edu>
To: Boris Zbarsky <bzbarsky@mit.edu>
CC: Brendan Eich <brendan@mozilla.com>, Brandon Benvie <brandon@brandonbenvie.com>, public-script-coord@w3.org, es-discuss@mozilla.org
On 8/12/12 4:55 PM, Boris Zbarsky wrote:
> There was a bunch of previous discussion about this at
> http://lists.w3.org/Archives/Public/public-script-coord/2012JanMar/0010.html
> and following, though it's not clear to me now whether the solution we
> decided on allows var to shadow these named props as desired after all...

And in particular, it's interesting to compare the claims from Ojan in 
that thread about web developer desires to the practice of what they 
actually expect that we ran into with indexedDB...

In any case, it does sound to me like putting the GSP on the proto chain 
is not enough to get the behavior if the ES5.1 behavior stays as-is 
unless it explicitly checks for props on the global itself a la 

Note that data in 
suggests that IE also implements the erratum to 5.1 we were talking 
about up-thread.  Oh what a tangled web we weave.

But the whole thread is worth reading (even if I was just as confused 
back then about the spec status of the var shadowing behavior: I thought 
it was in ES5, not in an erratum to 5.1).  If nothing else it contains 
somewhat of a description of how Gecko and IE implement their global 
scope polluters.

Received on Sunday, 12 August 2012 21:03:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC