# Document
Class
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Add | node As Node | (None) | Adds the supplied item to the end of this document. |
| Clear | (None) | (None) | Removes every root-level node from the document. |
| ContainerAtPoint | node As Node <br> x As Double <br> y As Double | Node | Returns the deepest compatible container at the specified document coordinates. |
| Detach | node As Node | Boolean | Removes the supplied node from its current document container. |
| DropIndicator | node As Node <br> x As Double <br> y As Double | Rect | Returns the document bounds of the insertion indicator for the supplied dragged node. |
| DropIntoContainer | node As Node <br> x As Double <br> y As Double | Boolean | Moves the supplied node into the compatible container at the specified document coordinates. |
| FindPlacement | node As Node <br> ByRef parent As Node <br> ByRef slot As Integer <br> ByRef index As Integer | Boolean | Finds placement and returns the matching result. |
| IndexOf | node As Node | Integer | Returns the zero-based root-level index of the supplied node, or -1 if it is not a root-level node. |
| InsertAfter | existing As Node <br> node As Node | (None) | Inserts after into the target container or root document. |
| InsertAt | index As Integer <br> node As Node | (None) | Inserts at into the target container or root document. |
| InsertAtPoint | node As Node <br> x As Double <br> y As Double | Boolean | Inserts a node at the container or root-level insertion point nearest the supplied document coordinates. |
| IsTopLevel | node As Node | Boolean | Returns whether is top level. |
| LastIndex | (None) | Integer | Returns the zero-based index of the last root-level node, or -1 when the document is empty. |
| MoveBefore | node As Node <br> target As Node | (None) | Moves before within the document. |
| MoveToEnd | node As Node | (None) | Moves to end within the document. |
| MoveToPoint | node As Node <br> x As Double <br> y As Double | Boolean | Moves the supplied node to the root-level insertion point nearest the supplied document coordinates. |
| NodeAt | index As Integer | Node | Returns the node at the specified zero-based index. |
| NodeAtPoint | x As Double <br> y As Double | Node | Returns the deepest node at the specified document coordinates. |
| NodeWithID | identifier As String | Node | Returns the node with the supplied stable identifier, including embedded nodes. |
| Remove | node As Node | (None) | Removes the matching item from this document. |