extractContents method

Removes the contents of a range from a document or document fragment and puts it a new document fragment.

 

Syntax

HRESULT retVal = object.extractContents(oDocumentFragment);

Parameters

  • oDocumentFragment [out, retval]
    Type: document

    Returns an object that contains the extracted content.

Return value

Type: HRESULT

This method can return one of these values.

Return code Description
S_OK

The operation completed successfully.

 

Exceptions

Exception Condition
InvalidStateError

IHTMLDOMRange::detach has been invoked on the object.

HierarchyRequestError

A document type node is included in the range that is being cloned. Versions earlier than Internet Explorer 10 return W3Exception_DOM_HIERARCHY_REQUEST_ERR.

NoModificationAllowedError

Some of the contents or nodes are read-only. Versions earlier than Internet Explorer 10 return W3Exception_DOM_NO_MODIFICATION_ALLOWED_ERR.

 

Standards information