cloneContents method

Returns a document fragment containing the nodes of a range. If any nodes are partially selected, their start or end nodes are included.

 

Syntax

 retVal = object.cloneContents(oDocumentFragment);

Parameters

  • oDocumentFragment [out, retval]
    Type: document

    Returns a document fragment object.

Exceptions

Exception Condition
InvalidStateError

IHTMLDOMRange::detach has been invoked on the object. Versions earlier thanInternet Explorer 10 return INVALID_STATE_ERR.

HierarchyRequestError

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

 

Standards information

See also

IHTMLDOMRange::cloneRange