Section 25.237. Range.extractContents( ): delete document content and return it in a DocumentFragment


25.237. Range.extractContents( ): delete document content and return it in a DocumentFragment

DOM Level 2 Range

25.237.1. Synopsis

 DocumentFragment extractContents( )     throws DOMException; 

25.237.1.1. Returns

A DocumentFragment node that contains the contents of this range.

25.237.1.2. Throws

This method throws a DOMException with a code of NO_MODIFICATION_ALLOWED_ERR if any part of the document content to be extracted is read-only or a code of HIERARCHY_REQUEST_ERR if the range contains a DocumentType node.

25.237.2. Description

This method deletes the specified range of a document and returns a DocumentFragment node that contains the deleted content. When this method returns, the range is collapsed, and the document may contain adjacent Text nodes (which can be merged with Node.normalize( )).

25.237.3. See Also

DocumentFragment, Range.cloneContents( ), Range.deleteContents( )




JavaScript. The Definitive Guide
JavaScript: The Definitive Guide
ISBN: 0596101996
EAN: 2147483647
Year: 2004
Pages: 767

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net