insertNode method
[This documentation is preliminary and is subject to change.]
Inserts a node into the start of a range object.
HRESULT retVal = object.insertNode(newNode);
newNode [in]
Type: IDispatchPointer to an IHTMLDOMNode interface that receives the node to insert.
Type: HRESULT
This method can return one of these values.
Return code | Description |
---|---|
S_OK | The operation completed successfully. |
W3CException_DOM_INVALID_STATE | detach has been invoked on the object. |
W3Exception_DOM_HIERARCHY_REQUEST_ERR | newNode is an ancestor of the container, or the container type for the start of the range does not allow children of type newNode. |
W3Exception_DOM_WRONG_DOCUMENT_ERR | newNode and the container for the start of the range were not created from the same document. |
W3Exception_DOM_NO_MODIFICATION_ALLOWED_ERR | A node or portion of the content in the range is read-only. |
If the container is of type IHTMLDOMTextNode, insertNode splits the text node, and inserts newNode between the resulting two text nodes.
If newNode is a document fragment, the children of the document fragment node are inserted rather than the newNode itself.
Build date: 1/26/2012