Share via


compareDocumentPosition method

Compares the position of two nodes in a document.

 

Syntax

USHORT retVal = object.compareDocumentPosition(otherNode);

Parameters

  • otherNode [in]
    Type: IHTMLDOMNode

    The node to be compared to the reference node, which is the node executing the method.

Standards information

Remarks

For information about the factors that affect the position of nodes within the DOM, see the Document Object Model (DOM) Level 3 Core Specification from the World Wide Web Consortium (W3C).

Windows Internet Explorer 9. The IHTMLDOMNode3::compareDocumentPosition method is supported only when webpages are displayed in IE9 Standards mode.