editor.range.Point Extends
One endpoint of a range, represented as a Node and and offset.

Inheritance

Constructor

goog.editor.range.Point(nodeoffset)

Parameters

node : Node
The node containing the point.
offset : number
The offset of the point into the node.

Instance Methods

Public Protected Private
getParentPoint() !goog.editor.range.Point
Gets the point of this point's node in the DOM.
Returns: !goog.editor.range.Point  The node's point.
code »

Instance Properties

node :
The node containing the point.
Code »
offset :
The offset of the point into the node.
Code »

Static Methods

goog.editor.range.Point.createDeepestPoint(nodeoffsetopt_trendLeftopt_stopOnChildlessElement) !goog.editor.range.Point
Construct the deepest possible point in the DOM that's equivalent to the given point, expressed as a node and an offset.
Arguments:
node : Node
The node containing the point.
offset : number
The offset of the point from the node.
opt_trendLeft : boolean=
Notice that a (node, offset) pair may be equivalent to more than one descendent (node, offset) pair in the DOM. By default, we trend rightward. If this parameter is true, then we trend leftward. The tendency to fall rightward by default is for consistency with other range APIs (like placeCursorNextTo).
opt_stopOnChildlessElement : boolean=
If true, and we encounter a Node which is an Element that cannot have children, we return a Point based on its parent rather than that Node itself.
Returns: !goog.editor.range.Point  A new point.
code »
goog.editor.range.Point.getPointAtEndOfNode(node) !goog.editor.range.Point
Construct a point at the very end of the given node.
Arguments:
node : Node
The node to create a point for.
Returns: !goog.editor.range.Point  A new point.
code »
goog.editor.range.Point.isTerminalElement_(node) boolean
Return true if the specified node is an Element that is not expected to have children. The createDeepestPoint() method should not traverse into such elements.
Arguments:
node : Node
.
Returns: boolean  True if the node is an Element that does not contain child nodes (e.g. BR, IMG).
code »

Package editor.range

Package Reference