goog.dom.ControlRange
Classgoog.dom.ControlRange
> goog.dom.AbstractMultiRange
> goog.dom.AbstractRange
goog.dom.ControlRange()
Create a new control selection with no properties. Do not use this constructor: use one of the goog.dom.Range.createFrom* methods instead.
.__iterator__()
.clone()
.collapse()
.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.AbstractMultiRange
.
Tests if this range contains the given range.
range
{goog.dom.AbstractRange
}
opt_allowPartial
{boolean
=}
boolean
}
.createFromBrowserRange(controlRange)
Create a new range wrapper from the given browser range object. Do not use this method directly - please use goog.dom.Range.createFrom* instead.
controlRange
{Object
}
goog.dom.ControlRange
}
.createFromElements(var_args)
Create a new range wrapper that selects the given element. Do not use this method directly - please use goog.dom.Range.createFrom* instead.
var_args
{...Element
}
goog.dom.ControlRange
}
.getAnchorNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getAnchorOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getBrowserRangeObject()
.getContainer()
.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
}
.getElements()
Array
.<Element
>}
.getEndNode()
.getEndOffset()
.getFocusNode()
Inherited from goog.dom.AbstractRange
.
Node
}
.getFocusOffset()
Inherited from goog.dom.AbstractRange
.
number
}
.getHtmlFragment()
.getPastableHtml
.getSortedElements()
Array
.<Element
>}
.getStartNode()
.getStartOffset()
.getText()
.getTextRange()
.getTextRangeCount()
.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()
.getValidHtml()
.getWindow()
Inherited from goog.dom.AbstractRange
.
Window
}
.insertNode(node, before)
Inherited from goog.dom.AbstractMultiRange
.
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()
.isRangeInDocument()
.isReversed()
Inherited from goog.dom.AbstractRange
.
boolean
}
.removeContents()
.replaceContentsWithNode()
.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()
.select()
.setBrowserRangeObject()
.surroundWithNodes(startNode, endNode)
Inherited from goog.dom.AbstractMultiRange
.
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
}