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

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 UTC