compareNodePositions

Type: Function

Deprecated!

Use XPath instead.

Compares the positions of the given nodes in dom order, with ancestors ordered before their descendants.

Refer to blueprintQuery for more information on how to import and use this function.

Arguments

  1. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to consider the nodes

  2. node1

    (Required)

    Type: Node

    The first node

  3. node2

    (Required)

    Type: Node

    The second node

Returns

Type: Number

Returns 0 if the nodes are equal, -1 if the first node precedes the second, and 1 otherwise.