ZVON > References > DOM2 Reference

extractContents (method )

Owning interface and usage:  
Range.extractContents()

Member of these other interfaces:  
none

Description:  
Moves the contents of a Range from the containing document or document fragment to a new DocumentFragment.

Parameters:  
none

Returns:  
DocumentFragment -  A document fragment containing the extracted contents.

Exceptions:  
DOMException NO_MODIFICATION_ALLOWED_ERR
Raised if any portion of the content of the Range is read-only or any of the nodes which contain any of the content of the Range are read-only.
DOMException HIERARCHY_REQUEST_ERR
Raised if a DocumentType node would be extracted into the new DocumentFragment.
DOMException INVALID_STATE_ERR
Raised if detach() has already been invoked on this object.