Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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


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 codeDescription
S_OK

The operation completed successfully.

 

Exceptions

ExceptionCondition
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

 

 

Community Additions

ADD
Show:
© 2015 Microsoft