Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 25. DOM Reference > isEqualNode: arg(3)

isEqualNode: arg(3)

This method compares the node on which the method is invoked with the node referenced by the other parameter. The two nodes are considered to be equal if:

  • They are of the same type

  • The following attributes are equal: nodeName, localName, namespaceURI, prefix, nodeValue

  • The attributes maps are equal (contain the same number of nodes that are equal to one another)

  • The childNodes lists are equal (the child node trees are identical, and each child passes this equality test with its counterpart in the other tree)

  • For DocumentType nodes only: the publicId, systemId, internalSubset, entities, and notations attributes must be identical as well

The method returns true if the nodes pass all of the above tests; otherwise, it returns false.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint