Moves the contents of a Range to a new parent node, placing the new parent node at the start position of the Range.
HRESULT surroundContents( IDispatch *newParent );
- [in] Pointer to an IHTMLDOMNode interface that receives the new node to make the parent.
Returns one of the following values.
S_OK The operation completed successfully. W3CException_DOM_HIERARCHY_REQUEST_ERR A document type node is included in the Range that is being cloned. W3CException_DOM_INVALID_STATE IHTMLDOMRange::detach has been invoked on the object. W3CException_DOM_NO_MODIFICATION_ALLOWED_ERR A boundary point in the Range is read-only.
If the newParent already exists in the document, its content is removed.