W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2011

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

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 31 Aug 2011 10:11:02 +0200
To: www-dom@w3.org, "David Flanagan" <dflanagan@mozilla.com>
Message-ID: <op.v02jooal64w2qv@annevk-macbookpro.local>
On Mon, 29 Aug 2011 22:00:09 +0200, David Flanagan <dflanagan@mozilla.com>  
> 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.


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

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:18 UTC