HTMLImageElement.IsEqualNode
Syntax:
Parameters:
<Node> (required)
The compared HTMLDOM node.
Returned value:
Description:
Two HTML nodes are equal if:
- the nodes belong to the same type;
- the following properties have equal values: (DOMAttribute.NodeName, DOMDocument.NodeName, DOMElement.NodeName, DOMDocumentType.NodeName, DOMNotation.NodeName, DOMEntity.NodeName, DOMDocumentFragment.NodeName, DOMText.NodeName, DOMComment.NodeName, DOMCDATASection.NodeName, DOMProcessingInstruction.NodeName, DOMEntityReference.NodeName, XPathNamespace.NodeName, DOMAttribute.LocalName, DOMDocument.LocalName, DOMElement.LocalName, DOMDocumentType.LocalName, DOMNotation.LocalName, DOMEntity.LocalName, DOMDocumentFragment.LocalName, DOMText.LocalName, DOMComment.LocalName, DOMCDATASection.LocalName, DOMProcessingInstruction.LocalName, DOMEntityReference.LocalName, XPathNamespace.LocalName, DOMAttribute.NamespaceURI, DOMDocument.NamespaceURI, DOMElement.NamespaceURI, DOMDocumentType.NamespaceURI, DOMNotation.NamespaceURI, DOMEntity.NamespaceURI, DOMDocumentFragment.NamespaceURI, DOMText.NamespaceURI, DOMComment.NamespaceURI, DOMCDATASection.NamespaceURI, DOMProcessingInstruction.NamespaceURI, DOMEntityReference.NamespaceURI, XPathNamespace.NamespaceURI, DOMAttribute.Prefix, DOMDocument.Prefix, DOMElement.Prefix, DOMDocumentType.Prefix, DOMNotation.Prefix, DOMEntity.Prefix, DOMDocumentFragment.Prefix, DOMText.Prefix, DOMComment.Prefix, DOMCDATASection.Prefix, DOMProcessingInstruction.Prefix, DOMEntityReference.Prefix, XPathNamespace.Prefix, DOMAttribute.NodeValue, DOMDocument.NodeValue, DOMElement.NodeValue, DOMDocumentType.NodeValue, DOMNotation.NodeValue, DOMEntity.NodeValue, DOMDocumentFragment.NodeValue, DOMText.NodeValue, DOMComment.NodeValue, DOMCDATASection.NodeValue, DOMProcessingInstruction.NodeValue, DOMEntityReference.NodeValue, XPathNamespace.NodeValue) (both are undefined or equal);
- the node attribute collections are equal: both are undefined or have the same size and value for the same keys (that can have different indices);
- the child node lists are equal: both are empty or have the same length and contain equal nodes with the same indices.
Normalization affects equality. To avoid comparison errors, you are recommended to normalize nodes before comparison.
Two DocumentType nodes are equal, if all of the above conditions are met and the following is true:
- the following properties have equal values: PublicId, SystemId, InternalSubset;
- entity definition collections are equal;
- notation collections are equal.
Equality is not affected by:
- DOMAttribute.OwnerDocument, DOMDocument.OwnerDocument, DOMElement.OwnerDocument, DOMDocumentType.OwnerDocument, DOMNotation.OwnerDocument, DOMEntity.OwnerDocument, DOMDocumentFragment.OwnerDocument, DOMText.OwnerDocument, DOMComment.OwnerDocument, DOMCDATASection.OwnerDocument, DOMProcessingInstruction.OwnerDocument, DOMEntityReference.OwnerDocument, XPathNamespace.OwnerDocument, DOMAttribute.BaseURI, DOMDocument.BaseURI, DOMElement.BaseURI, DOMDocumentType.BaseURI, DOMNotation.BaseURI, DOMEntity.BaseURI, DOMDocumentFragment.BaseURI, DOMText.BaseURI, DOMComment.BaseURI, DOMCDATASection.BaseURI, DOMProcessingInstruction.BaseURI, DOMEntityReference.BaseURI, XPathNamespace.BaseURI and DOMAttribute.ParentNode, DOMDocument.ParentNode, DOMElement.ParentNode, DOMDocumentType.ParentNode, DOMNotation.ParentNode, DOMEntity.ParentNode, DOMDocumentFragment.ParentNode, DOMText.ParentNode, DOMComment.ParentNode, DOMCDATASection.ParentNode, DOMProcessingInstruction.ParentNode, DOMEntityReference.ParentNode, XPathNamespace.ParentNode properties;
- the Specified property for Attribute nodes;
- the IsElementContentWhitespace for Text nodes;
- user data.
Note. Anything that is not included in the above list does not affect equality.
Availability: