compareDocumentPosition method

[This documentation is preliminary and is subject to change.]

Compares the position of two nodes in a document.

Document Object Model (DOM) Level 3 Core Specification, Section 1.2Internet Explorer 9

Syntax

USHORT retVal = object.compareDocumentPosition(otherNode);

Standards information

Parameters

  • otherNode [in]
    Type: IHTMLDOMNode

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

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 compareDocumentPosition method is supported only when webpages are displayed in IE9 Standards mode.

 

 

Build date: 1/26/2012