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.

Document Object Model (DOM) Level 2 Traversal and Range Specification, Section 2.13Internet Explorer 9

Syntax

var oDocumentFragment = Range.cloneContents();

Parameters

oDocumentFragment [out, retval]

Type: document

Returns a document fragment object.

Return value

Type: document

Returns a document fragment object.

Exceptions

ExceptionCondition
InvalidStateError

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

Range
cloneRange

 

 

Show:
© 2014 Microsoft