The Range interface represents a fragment of a document that can contain nodes and parts of text nodes.
Documentation Range by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See also:
Static variables
Constructor
Variables
read onlycollapsed:Bool
Returns a Boolean indicating whether the range's start and end points are at the same position.
read onlycommonAncestorContainer:Node
Returns the deepest Node that contains the startContainer and endContainer nodes.
Methods
compareBoundaryPoints(how:Int, sourceRange:Range):Int
comparePoint(node:Node, offset:Int):Int
Returns -1, 0, or 1 indicating whether the point occurs before, inside, or after the Range.
Throws:
null | DOMError |
|---|
createContextualFragment(fragment:String):DocumentFragment
getClientRects():DOMRectList
Returns a list of DOMRect objects that aggregates the results of Element.getClientRects() for all the elements in the Range.