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

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

From: <bugzilla@jessica.w3.org>
Date: Mon, 24 Jan 2011 17:29:14 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1PhQE6-0001Gc-Qw@jessica.w3.org>

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
                 CC|                            |jackalmage@gmail.com,
                   |                            |Simetrical+w3cbug@gmail.com

--- Comment #4 from Boris Zbarsky <bzbarsky@mit.edu> 2011-01-24 17:29:14 UTC ---
> I am told IE says "string,string,string" (thanks to Tab and Aryeh).

ccing them.  It looks like in IE the presence or absence of |var| there is key.
 If it's present, then a new property is presumably created on the global
object which shadows the property on the prototype, which is why you end up
with "number" alerted for the second alert in my testcase.

If I change the testcase in
http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2010-July/027002.html to
say "var name = 1" and not use a function wrapper around the code, then IE
alerts "undefined,number,number", Gecko alerts "string,string,number", Safari
and Chrome alert "string,string,string", Opera alerts

So maybe the |name| property doesn't need to be replaceable if it actually
lives on the prototype instead of the window itself and if |var| introduces a
new property of that name on the window itself?

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 Monday, 24 January 2011 17:29:16 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:31:04 UTC