goog.dom.AbstractRange | |
goog.dom.AbstractMultiRange | goog.dom.AbstractRange |
goog.dom.MultiRange | goog.dom.AbstractMultiRange |
![]()
No description.
|
code » | ||
![]()
Clears cached values. Should be called whenever this.browserRanges_ is
modified.
|
code » | ||
No description.
Returns: !goog.dom.MultiRange
A clone of this range.
|
code » | ||
![]()
Collapses this range to a single point, either the first or last point
depending on the parameter. This will result in the number of ranges in this
multi range becoming 1.
Arguments:
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » | ||
![]()
No description.
|
code » |
Returns a RangeIterator over the contents of the range. Regardless of the
direction of the range, the iterator will move in document order.
Arguments:
Returns: !goog.dom.RangeIterator
An iterator over tags in the range.
|
code » | |||
No description.
Returns: !goog.dom.AbstractRange
A clone of this range.
|
code » | |||
![]()
Collapses the range to one of its boundary points.
Arguments:
|
code » | |||
Tests if this range contains the given node.
|
code » | |||
Tests if this range contains the given range.
Arguments:
Returns: boolean
Whether this range contains the given range.
|
code » | |||
No description.
Returns: Node
The element or text node the range is anchored at.
|
code » | |||
No description.
Returns: number
The offset into the node the range is anchored at. For
text nodes, this is an offset into the node value. For elements, this
is an offset into the childNodes array.
|
code » | |||
![]()
No description.
Returns: Range | TextRange
The native browser range object.
|
code » | |||
No description.
Returns: Node
The deepest node that contains the entire range.
|
code » | |||
Returns the deepest element in the tree that contains the entire range.
Returns: Element
The deepest element that contains the entire range.
|
code » | |||
No description.
Returns: !Document
The document this selection is a part of.
|
code » | |||
No description.
Returns: Node
The element or text node the range ends in.
|
code » | |||
No description.
Returns: number
The offset into the node the range ends in. For text
nodes, this is an offset into the node value. For elements, this is
an offset into the childNodes array.
|
code » | |||
No description.
Returns: goog.math.Coordinate
The coordinate of the selection end
node and offset.
|
code » | |||
No description.
Returns: Node
The element or text node the range is focused at - i.e. where
the cursor is.
|
code » | |||
No description.
Returns: number
The offset into the node the range is focused at - i.e.
where the cursor is. For text nodes, this is an offset into the node
value. For elements, this is an offset into the childNodes array.
|
code » | |||
Returns the HTML fragment this range selects. This is slow on all browsers.
The HTML fragment may not be valid HTML, for instance if the user selects
from a to b inclusively in the following html:
>div<a>/div<b
This method will return
a</div>b
If you need valid HTML, use
#getValidHtml instead.
Returns: string
HTML fragment of the range, does not include context
containing elements.
|
code » | |||
Returns pastable HTML for this range. This guarantees that any child items
that must have specific ancestors will have them, for instance all TDs will
be contained in a TR in a TBODY in a TABLE and all LIs will be contained in
a UL or OL as appropriate. This is semi-fast on all browsers.
Returns: string
Pastable HTML of the range, including context containing
elements.
|
code » | |||
No description.
Returns: Node
The element or text node the range starts in. For text
ranges, the range comprises all text between the start and end position.
For other types of range, start and end give bounds of the range but
do not imply all nodes in those bounds are selected.
|
code » | |||
No description.
Returns: number
The offset into the node the range starts in. For text
nodes, this is an offset into the node value. For elements, this is
an offset into the childNodes array.
|
code » | |||
No description.
Returns: goog.math.Coordinate
The coordinate of the selection start node
and offset.
|
code » | |||
No description.
Returns: string
The text content of the range.
|
code » | |||
Get the i-th text range in this range. The behavior is undefined if
i >= getTextRangeCount or i < 0.
Arguments:
Returns: goog.dom.TextRange
The i-th text range.
|
code » | |||
No description.
Returns: number
The number of text ranges in this range.
|
code » | |||
Gets an array of all text ranges this range is comprised of. For non-multi
ranges, returns a single element array containing this.
|
code » | |||
![]()
No description.
Returns: goog.dom.RangeType
The type of range represented by this object.
|
code » | |||
Returns valid HTML for this range. This is fast on IE, and semi-fast on
other browsers.
Returns: string
Valid HTML of the range, including context containing
elements.
|
code » | |||
No description.
Returns: !Window
The window this selection is a part of.
|
code » | |||
Inserts a node before (or after) the range. The range may be disrupted
beyond recovery because of the way this splits nodes.
|
code » | |||
No description.
Returns: boolean
Whether the range is collapsed.
|
code » | |||
Tests whether this range is valid (i.e. whether its endpoints are still in
the document). A range becomes invalid when, after this object was created,
either one or both of its endpoints are removed from the document. Use of
an invalid range can lead to runtime errors, particularly in IE.
Returns: boolean
Whether the range is valid.
|
code » | |||
No description.
Returns: boolean
Whether the selection is reversed.
|
code » | |||
Replaces the range contents with (possibly a copy of) the given node. The
range may be disrupted beyond recovery because of the way this splits nodes.
|
code » | |||
Saves the range using HTML carets. As long as the carets remained in the
HTML, the range can be restored...even when the HTML is copied across
documents.
Returns: ?goog.dom.SavedCaretRange
A range representation that can be
restored as long as carets are not removed. Returns null if carets
could not be created.
|
code » | |||
Saves the range so that if the start and end nodes are left alone, it can
be restored.
Returns: !goog.dom.SavedRange
A range representation that can be restored
as long as the endpoint nodes of the selection are not modified.
|
code » | |||
Sets the native browser range object, overwriting any state this range was
storing.
Arguments:
Returns: boolean
Whether the given range was accepted. If not, the caller
will need to call goog.dom.Range.createFromBrowserRange to create a new
range object.
|
code » | |||
![]()
Surrounds this range with the two given nodes. The range may be disrupted
beyond recovery because of the way this splits nodes.
|
code » |
![]()
Array of browser sub-ranges comprising this multi-range.
|
Code » | |
![]()
No description.
|
Code » | |
![]()
Lazily computed container node.
|
Code » | |
Logging object.
|
Code » | |
![]()
Lazily initialized array of range objects comprising this multi-range.
|
Code » | |
![]()
Lazily computed sorted version of ranges_, sorted by start point.
|
Code » |
![]()
No description.
|
Code » |
Creates a new range wrapper from the given browser ranges. Do not
use this method directly - please use goog.dom.Range.createFrom* instead.
Arguments:
Returns: !goog.dom.MultiRange
A range wrapper object.
|
code » | ||
Creates a new range wrapper from the given browser selection object. Do not
use this method directly - please use goog.dom.Range.createFrom* instead.
Arguments:
Returns: !goog.dom.MultiRange
A range wrapper object.
|
code » | ||
Creates a new range wrapper from the given goog.dom.TextRange objects. Do
not use this method directly - please use goog.dom.Range.createFrom* instead.
Arguments:
Returns: !goog.dom.MultiRange
A range wrapper object.
|
code » |
![]()
No description.
|
Code » |