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

Re: variable declarations shadowing named properties on window

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 05 Jan 2012 19:49:58 -0500
Message-ID: <4F064536.2050300@mit.edu>
To: Cameron McCormack <cam@mcc.id.au>
CC: Travis Leithead <travis.leithead@microsoft.com>, Ojan Vafai <ojan@chromium.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Ian Hickson <ian@hixie.ch>
On 1/5/12 6:14 PM, Cameron McCormack wrote:
> That means, if my reading of the spec is right, the
> following document
>
> <!DOCTYPE html>
> <script>var toString; alert(toString)</script>
>
> should alert String(Object.prototype.toString) and not "undefined".
> Firefox, Opera and IE alert "undefined". Chrome/Safari alert the function.

Hmm.  The spec definitely changed in this regard in the last year.  I'd 
love it if one of the people familiar with that spec change could link 
to the current text that matters...

-Boris
Received on Friday, 6 January 2012 00:50:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC