XML DOM cloneContents() method
Definition and usage
cloneContents() method copies the content of the range (Range) to a DocumentFragment object.
Syntax:
extractContents()
Return value
One DocumentFragment node, containing a copy of the document content within the range.
throw
If the current range includes DocumentType node, this method will throw an error with the code HIERARCHY_REQUEST_ERR DOMException exception.
Description
This method will copy the content of the current range, storing it in a DocumentFragment objectReturns this object.