Re: setAttributeNS(): should it change the namespace prefix?

On 11/29/11 11:22 AM, Anne van Kesteren wrote:
> document.head.setAttributeNS("test", "x:a", "a")
> document.head.setAttributeNS("test", "e:a", "b")
>
> Should the result be an attribute "x:a" or "e:a"? Gecko says "e:a",
> Opera/Webkit say "x:a". Making the prefix member of an attribute
> completely immutable seems somewhat preferable to me.

Why?

Maybe our respective biases are showing here, but it seems to me like 
this sequence of calls:

   document.head.setAttributeNS("test", "x:a", "a")
   document.head.removeAttributeNS("test", "a");
   document.head.setAttributeNS("test", "e:a", "b")

should act just like your first example.  Which it does in Gecko, but 
not in Webkit/Opera, right?

-Boris

Received on Tuesday, 29 November 2011 18:13:54 UTC