Visit Mozilla.org

DOM:range.detach

From MDC

« Gecko DOM Reference

Contents

[edit] Summary

Releases Range from use to improve performance.

[edit] Syntax

range.detach();

[edit] Example

range = document.createRange();
range.selectNode(document.getElementsByTagName("div").item(0));
range.detach();

[edit] Notes

Allows mozilla to relinquish resources associated with this Range. Subsequent attempts to use the detached range will result in a DOMException being thrown with an error code of INVALID_STATE_ERR.

[edit] Specification

detach