extractContents method

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

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

Syntax

var oDocumentFragment = Range.extractContents();

Parameters

oDocumentFragment [out, retval]

Type: document

Returns an object that contains the extracted content.

Return value

Type: document

Returns an object that contains the extracted content.

Exceptions

ExceptionCondition
InvalidStateError

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

See also

Range

 

 

Show:
© 2014 Microsoft