unsafeMoveNodes

Type: Function

Moves the specified sequence of nodes to the new position, preserving all positions within the sequence.

Should not be used directly. The "unsafe" part in this function only refers to the fact that the function does not do any validation, in contrast to primitives that always guarantee a schema-valid result on an unmodified blueprint.

Positions inside the moved subtrees are kept in place. Positions between the moved nodes, including the position just after the last node and optionally the position just before the first, are moved to the new positions of the adjacent nodes.

Arguments

  1. firstSibling

    (Required)

    Type: Node

    The first node to move

  2. lastSibling

    (Required)

    Type: Node | NULL

    The last node to move, must be a sibling following the first, or null to move all siblings from firstSibling until the end of its parent.

  3. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to perform the operation

  4. newParent

    (Required)

    Type: Node

    The node under which to place the nodes

  5. newReferenceNode

    (Required)

    Type: Node | NULL

    The node before which to place the nodes, or null to place the nodes at the end of newParent

  6. includePositionBeforeFirst

    (Required)

    Type: Boolean

    Whether to move the position just before the first node to the new parent.