![]()
Assert that the range is surrounded by the given strings. This is useful
because different browsers can place the range endpoints inside different
nodes even when visually the range looks the same. Also, there may be empty
text nodes in the way (again depending on the browser) making it difficult to
use assertRangeEquals.
Arguments:
|
code » | |||||
![]()
Returns the next (in document order) node from the given node that is a
non-empty text node, or null if none is found or opt_stopAt is not an
ancestor of node. Note that if the given node has children, the search will
start from the start tag of the node, meaning all its descendants will be
included in the search, unless opt_skipDescendants is true.
Arguments:
Returns: Text
The next (in document order) node from the given node that
is a non-empty text node, or null if none is found or opt_stopAt is not
an ancestor of node.
|
code » | |||||
![]()
Helper that returns the previous or next (in document order) node from the
given node that is a non-empty text node, or null if none is found or
opt_stopAt is not an ancestor of node. Note that if the given node has
children, the search will start from the end or start tag of the node
(depending on whether it's searching for the previous or next node), meaning
all its descendants will be included in the search, unless
opt_skipDescendants is true.
Arguments:
Returns: Text
The next (in document order) node from the given node that
is a non-empty text node, or null if none is found or opt_stopAt is not
an ancestor of node.
|
code » | |||||
![]()
Returns the previous (in document order) node from the given node that is a
non-empty text node, or null if none is found or opt_stopAt is not an
ancestor of node. Note that if the given node has children, the search will
start from the end tag of the node, meaning all its descendants will be
included in the search, unless opt_skipDescendants is true.
Arguments:
Returns: Text
The previous (in document order) node from the given node
that is a non-empty text node, or null if none is found.
|
code » | |||||
Returns the depth of the given node relative to the given parent node, or -1
if the given node is not a descendant of the given parent node. E.g. if
node == parentNode returns 0, if node.parentNode == parentNode returns 1,
etc.
|
code » | |||||
Returns the text that follows the given range, where the term "follows" means
"comes immediately before the start of the range" if isBefore is true, and
"comes immediately after the end of the range" if isBefore is false, or null
if no non-empty text node is found.
Arguments:
Returns: ?string
The text that follows the given range, or null if no
non-empty text node is found.
|
code » | |||||
Returns whether the given node is a non-empty text node.
|
code » |