W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > February 2011

[Bug 11838] In Gecko, Opera, and IE, the "name" property on Window is replaceable

From: <bugzilla@jessica.w3.org>
Date: Sat, 19 Feb 2011 01:30:40 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1Pqbei-0008VQ-66@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11838

--- Comment #8 from Boris Zbarsky <bzbarsky@mit.edu> 2011-02-19 01:30:39 UTC ---
> The difference in behaviour with 'var' vs no-'var' seems unsupported by the JS
> spec; am I misreading the spec?

I believe 'var' vs no-'var' should in fact behave differently.  See
<https://bugzilla.mozilla.org/show_bug.cgi?id=632003#c1>.  Whether that erratum
has made it to the official drafts, I don't know.

So it sounds like we could just make 'name' live on Window.prototype and be a
regular getter/setter pair there.  It would mean that doing |name = "foo"| at
global scope without declaring |var name| beforehand would actually rename the
window, which seems somewhat undesirable for authors.  But maybe that's ok.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Saturday, 19 February 2011 01:30:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 19 February 2011 01:30:51 GMT