Re: [DOMCore] Node.isEqualNode() and Attr object equality

On Mon, 29 Aug 2011 22:00:09 +0200, David Flanagan <dflanagan@mozilla.com>  
wrote:
> The spec for Node.isEqualNode() says that "the associated list of  
> attributes" of two elements must be equal in order for the function to  
> return true.  The word "list" implies that the attributes are to be  
> compared as a list, in which order matters.  But I think that the intent  
> is that they are to be compared as sets in which order does not matter.   
> Right?

Yeah, that sounds correct. I wish we could turn attributes into a  
dictionary rather than a list, but I think that ship has sailed.


> Also, the spec does not seem to say what it means for two Attr objects  
> to be equal.  I suspect that the prefix of an attribute does not matter  
> for equality: only the namespace, local name and value.  Correct?  This  
> is the behavior that I see in Firefox, at least.

I made this explicit.


Thanks!


-- 
Anne van Kesteren
http://annevankesteren.nl/

Received on Wednesday, 31 August 2011 08:11:44 UTC