goog.testing.MockRange.ConcreteRange_
Classgoog.testing.MockRange.ConcreteRange_
> goog.dom.AbstractRange
.__iterator__
Undefine the iterator so the mock framework can loop through this class' properties.
opt_keys
{boolean
=}
goog.dom.RangeIterator
}
.clone()
Inherited from goog.dom.AbstractRange
.
goog.dom.AbstractRange
}
.collapse(toAnchor)
Inherited from goog.dom.AbstractRange
.
Collapses the range to one of its boundary points.
toAnchor
{boolean
}
.containsNode(node, opt_allowPartial)
Inherited from goog.dom.AbstractRange
.
Tests if this range contains the given node.
node
{Node
}
opt_allowPartial
{boolean
=}
boolean
}
.containsRange(range, opt_allowPartial)
Inherited from goog.dom.AbstractRange
.
Tests if this range contains the given range.
range
{goog.dom.AbstractRange
}
opt_allowPartial
{boolean
=}
boolean
}
.getAnchorNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getAnchorOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getBrowserRangeObject()
Inherited from goog.dom.AbstractRange
.
Range
|TextRange
}
.getContainer()
Inherited from goog.dom.AbstractRange
.
Node
}
.getContainerElement()
Inherited from goog.dom.AbstractRange
.
Returns the deepest element in the tree that contains the entire range.
Element
}
.getDocument()
Inherited from goog.dom.AbstractRange
.
Document
}
.getEndNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getEndOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getFocusNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getFocusOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getHtmlFragment()
Inherited from goog.dom.AbstractRange
.
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 {@link #getValidHtml} instead.
string
}
.getPastableHtml()
Inherited from goog.dom.AbstractRange
.
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.
string
}
.getStartNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getStartOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getText()
Inherited from goog.dom.AbstractRange
.
string
}
.getTextRange(i)
Inherited from goog.dom.AbstractRange
.
Get the i-th text range in this range. The behavior is undefined if i >= getTextRangeCount or i < 0.
i
{number
}
goog.dom.TextRange
}
.getTextRangeCount()
Inherited from goog.dom.AbstractRange
.
number
}
.getTextRanges()
Inherited from goog.dom.AbstractRange
.
Gets an array of all text ranges this range is comprised of. For non-multi ranges, returns a single element array containing this.
Array
.<goog.dom.TextRange
>}
.getType()
Inherited from goog.dom.AbstractRange
.
goog.dom.RangeType
}
.getValidHtml()
Inherited from goog.dom.AbstractRange
.
Returns valid HTML for this range. This is fast on IE, and semi-fast on other browsers.
string
}
.getWindow()
Inherited from goog.dom.AbstractRange
.
Window
}
.insertNode(node, before)
Inherited from goog.dom.AbstractRange
.
Inserts a node before (or after) the range. The range may be disrupted beyond recovery because of the way this splits nodes.
node
{Node
}
before
{boolean
}
Node
}
.isCollapsed()
Inherited from goog.dom.AbstractRange
.
boolean
}
.isRangeInDocument()
Inherited from goog.dom.AbstractRange
.
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.
boolean
}
.isReversed()
Inherited from goog.dom.AbstractRange
.
boolean
}
.removeContents()
Inherited from goog.dom.AbstractRange
.
Removes the contents of the range from the document.
.replaceContentsWithNode(node)
Inherited from goog.dom.AbstractRange
.
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.
node
{Node
}
Node
}
.saveUsingCarets()
Inherited from goog.dom.AbstractRange
.
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.
goog.dom.SavedCaretRange
?}
.saveUsingDom()
Inherited from goog.dom.AbstractRange
.
Saves the range so that if the start and end nodes are left alone, it can be restored.
goog.dom.SavedRange
}
.select()
Inherited from goog.dom.AbstractRange
.
Sets this range as the selection in its window.
.setBrowserRangeObject(nativeRange)
Inherited from goog.dom.AbstractRange
.
Sets the native browser range object, overwriting any state this range was storing.
nativeRange
{Range
|TextRange
}
boolean
}
.surroundWithNodes(startNode, endNode)
Inherited from goog.dom.AbstractRange
.
Surrounds this range with the two given nodes. The range may be disrupted beyond recovery because of the way this splits nodes.
startNode
{Element
}
endNode
{Element
}