Section 25.235. Range.deleteContents(): delete a region of the document


25.235. Range.deleteContents(): delete a region of the document

DOM Level 2 Range

25.235.1. Synopsis

 void deleteContents( )     throws DOMException; 

25.235.1.1. Throws

If any portion of the document that is represented by this range is read-only, this method throws a DOMException with a code of NO_MODIFICATION_ALLOWED_ERR.

25.235.2. Description

This method deletes all document content represented by this range. When this method returns, the range is collapsed with both boundary points at the start position. Note that the deletion may result in adjacent Text nodes that can be merged with a call to Node.normalize( ).

See Range.cloneContents( ) for a way to copy document content and Range.extractContents( ) for a way to copy and delete document content in a single operation.

25.235.3. See Also

Node.normalize( ), Range.cloneContents( ), Range.extractContents( )




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