compareOffsetPositions

Type: Function

Deprecated!

Use XPath instead.

Compares the given positions in container + offset notation w.r.t. document order in this state.

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. containerNode1

    (Required)

    Type: Node

    Container for the first position

  3. offset1

    (Required)

    Type: Number

    Offset of the first position

  4. containerNode2

    (Required)

    Type: Node

    Container for the second position

  5. offset2

    (Required)

    Type: Number

    Offset of the second position

Returns

Type: Number

Returns 0 if the positions are equal, -1 if the first position precedes the second, and 1 otherwise.