Range: represents a contiguous range of a document — DOM Level 2 Range: Object → Range
These constants specify how the boundary points of two Range
objects are compared. They are the legal values for the
how argument to the
compareBoundaryPoints( ) method (see the
unsigned short START_TO_START = 0
Compares the start of the specified range to the start of this range.
unsigned short START_TO_END = 1
Compares the start of the specified range to the end of this range.
unsigned short END_TO_END = 2
Compares the end of the specified range to the end of this range.
unsigned short END_TO_START = 3
Compares the end of the specified range to the start of this range.
The Range interface defines the following properties. Note that all of
these properties are read-only. You cannot change the start or end
points of a range by setting properties; you must call
setEnd( ) or
setStart( ) instead. Note also that after
you call the
detach( ) method of
a Range object, any subsequent attempt to read any of these
properties throws a DOMException with a
readonly boolean collapsed
trueif the start and the end of the range are at the same point in the document—that is, if the range is empty or “collapsed.”
readonly Node commonAncestorContainer
The most deeply nested Document node that contains (i.e., is an ancestor of) both the start and end points of the range.
readonly Node endContainer
The Document node that ...