Range class

Annotations
  • DomName('Range')
  • Unstable()

Constructors

Range()
Range.fromPoint(Point point)

Constants

END_TO_END = 2
END_TO_START = 3
NODE_AFTER = 1
NODE_BEFORE = 0
NODE_BEFORE_AND_AFTER = 2
NODE_INSIDE = 3
START_TO_END = 1
START_TO_START = 0

Static Properties

supportsCreateContextualFragment bool
read-only

Instance Properties

collapsed bool
read-only
commonAncestorContainer Node
read-only
endContainer Node
read-only
endOffset int
read-only
startContainer Node
read-only
startOffset int
read-only

Instance Methods

cloneContents() → DocumentFragment
cloneRange() → Range
collapse([bool toStart]) → void
compareBoundaryPoints(int how, Range sourceRange) → int
comparePoint(Node refNode, int offset) → int
createContextualFragment(String html) → DocumentFragment
deleteContents() → void
detach() → void
expand(String unit) → void
extractContents() → DocumentFragment
getBoundingClientRect() → Rectangle
getClientRects() → List<Rectangle>
insertNode(Node newNode) → void
isPointInRange(Node refNode, int offset) → bool
selectNode(Node refNode) → void
selectNodeContents(Node refNode) → void
setEnd(Node refNode, int offset) → void
setEndAfter(Node refNode) → void
setEndBefore(Node refNode) → void
setStart(Node refNode, int offset) → void
setStartAfter(Node refNode) → void
setStartBefore(Node refNode) → void
surroundContents(Node newParent) → void