Table of Contents

Method MoveTo

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

MoveTo(DomNode, int)

Moves the range into another host: every node is detached from its current parent and re-added at the destination, in order. Moving within the same collection is supported.

public void MoveTo(DomNode target, int index = -1)

Parameters

target DomNode

The node whose child collection receives the nodes.

index int

The insertion index, or -1 to append. It is interpreted after the nodes have been detached.

Exceptions

ArgumentNullException

target is null.

ArgumentException

target holds no editable child collection, cannot hold this range's node type, or is inside the range being moved.

InvalidOperationException

The range no longer describes a contiguous span of its parent's children.