/*
It seems that triple-clicking a paragraph gives you a selection that extends into the following paragraph... maybe the problem is that endContainer then is that ELEMENT_NODE instead of a TEXT_NODE? So I should stop recursing as soon as I see the endContainer? But that sometimes gets me no text...
1 | 2 |
3 | 4 |
Properties
- collapsed
- Returns a
boolean
indicating whether the range's start and end points are at the same position.- commonAncestorContainer
- Returns the deepest
Node
that contains the startContainer and endContainer Nodes.- endContainer
- Returns the
Node
within which the Range ends.- endOffset
- Returns a number representing where in the endContainer the Range ends.
- startContainer
- Returns the
Node
within which the Range starts.- startOffset
- Returns a number representing where in the startContainer the Range starts.