Inserts a node into the start of a range object.
HRESULT insertNode( IDispatch *newNode );
- [in] Pointer to an IHTMLDOMNode interface that receives the node to insert.
Returns one of the following values.
S_OK The operation completed successfully. W3CException_DOM_INVALID_STATE IHTMLDOMRange::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, IHTMLDOMRange::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.