DOM:range.collapsed
From MDC
Contents |
[edit] Summary
Returns a boolean indicating whether the range's start and end points are at the same position.
[edit] Syntax
isCollapsed = range.collapsed;
[edit] Example
range = document.createRange(); range.setStart(startNode,startOffset); range.setEnd(endNode,endOffset); isCollapsed = range.collapsed;
[edit] Notes
Returns a boolean of true if the start and end boundary points of the Range are the same point in the DOM, false if not.
A collapsed Range is empty, containing no content, specifying a single-point in a DOM tree. The collapsed property is read-only. To collapse a range, see the collapse method.