Section 25.236. Range.detach(): free a Range object


25.236. Range.detach(): free a Range object

DOM Level 2 Range

25.236.1. Synopsis

 void detach( )     throws DOMException; 

25.236.1.1. Throws

Like all Range methods, detach( ) tHRows a DOMException with a code of INVALID_STATE_ERR if it is called on a Range object that has already been detached.

25.236.2. Description

DOM implementations keep track of all Range objects created for a document because they may need to change the range boundary points when the document is modified. When you are certain that a Range object isn't needed any more, call the detach( ) method to tell the implementation that it no longer needs to keep track of that range. Note that once this method has been called for a Range object, any use of that Range throws an exception. Calling detach( ) is not required but may improve performance in some circumstances when the document is being modified. A Range object is not subject to immediate garbage collection.




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