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>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=11838

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
"undefined,number,number".

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 24 January 2011 17:29:23 GMT