[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

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 UTC