Type: Function


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.


  1. blueprint


    Type: Blueprint

    The blueprint in which to consider the nodes

  2. node1


    Type: Node

    The first node

  3. node2


    Type: Node

    The second node


Type: Number

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