W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

Re: ACTION-61: text for embedding part of the Window object

From: Boris Zbarsky <bzbarsky@mit.edu>
Date: Mon, 06 Mar 2006 10:49:47 -0600
Message-ID: <440C682B.8030709@mit.edu>
CC: "Web APIs WG (public)" <public-webapi@w3.org>

Another question on window.name.  Consider the following HTML:

function doit() {
   document.getElementById("x").setAttribute("name", "y");
<body onload="doit()">
<iframe name="x" id="x">

When I load this, I get:

   Gecko: 'x'
   khtml: 'x'
   Opera: 'y'

If I modify my onload handler as follows:

function doit() {
   var node = document.getElementById("x");
   node.setAttribute("name", "y");

Then I get:

   Gecko: 'y'
   khtml: 'x'
   Opera: undefined

Oh, and in future versions of Gecko I may well end up getting 'x' as well, 
unless we take special pains to implement a different behavior.

I don't know what IE does on these testcases, but it'd be interesting to find out.

Not sure what, if anything, can be specced here, but....

Received on Monday, 6 March 2006 16:50:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:20 UTC