moveNode Method

Transfers node along with its children to a new location. Fails if destination has undefined child count.

moveNode(sourceNodeId: string, targetParentId: undefined | string, targetIndex: number): boolean

Parameter Type Description
sourceNodeId string Node that is being moved.
targetParentId undefined | string Node that will receive a new child.
targetIndex number Insertion location among target's current children.

Returns - boolean

true on success, false otherwise.

Defined in

Last Updated: 12 June, 2024