The goog.dom.browserrange Namespace

The goog.dom.browserrange.AbstractRange Class

The constructor for abstract ranges. Don't call this from subclasses. … more

The goog.dom.browserrange.Error Enum

Common error constants. … more

The goog.dom.browserrange.GeckoRange Class

The constructor for Gecko specific browser ranges. … more

The goog.dom.browserrange.IeRange Class

The constructor for IE specific browser ranges. … more

The goog.dom.browserrange.OperaRange Class

The constructor for Opera specific browser ranges. … more

The goog.dom.browserrange.W3cRange Class

The constructor for W3C specific browser ranges. … more

The goog.dom.browserrange.WebKitRange Class

The constructor for WebKit specific browser ranges. … more

.canContainRangeEndpoint(node)

Tests whether the given node can contain a range end point.

node {Node}
The node to check.
returns {boolean}
Whether the given node can contain a range end point.

.createRange(range)

Static method that returns the proper type of browser range.

range {Range|TextRange}
A browser range object.
returns {goog.dom.browserrange.AbstractRange}
A wrapper object.

.createRangeFromNodeContents(node)

Static method that returns the proper type of browser range.

node {Node}
The node to select.
returns {goog.dom.browserrange.AbstractRange}
A wrapper object.

.createRangeFromNodes(startNode, startOffset, endNode, endOffset)

Static method that returns the proper type of browser range.

startNode {Node}
The node to start with.
startOffset {number}
The offset within the node to start. This is either the index into the childNodes array for element startNodes or the index into the character array for text startNodes.
endNode {Node}
The node to end with.
endOffset {number}
The offset within the node to end. This is either the index into the childNodes array for element endNodes or the index into the character array for text endNodes.
returns {goog.dom.browserrange.AbstractRange}
A wrapper object.