[whatwg] Should window.name be [Replaceable]?

Biju bijumaillist at gmail.com
Sun Jul 4 21:35:54 PDT 2010


On Mon, Jul 5, 2010 at 12:05 AM, Joseph Pecoraro <pecoraro at apple.com> wrote:
>    - I didn't have access to IE to test. I'd appreciate
>      someone giving it a shot to see how they act.

On IE8 it is printing "string,string,string"


And it looks like in Firefox
1) name = with_a_number changes type to matched the assigned value
2)  window.name = with_a_number keeps the previous type

See
   (function() {
       var arr = [];
       arr.push( typeof window.name );
       name = 1;
        // "number" if [Replaceable], "string" otherwise
       arr.push( typeof window.name );
       window.name = 1;
       arr.push( typeof window.name );
       alert( arr );
   })();

give ===> string,number,number



More information about the whatwg mailing list