Interface Range
- All Known Implementing Classes:
RangeImpl
public interface Range
A fragment of a document that can contain nodes and parts of text nodes.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final short
static final short
static final short
static final short
-
Method Summary
Modifier and TypeMethodDescriptioncloneContents.void
collapse
(boolean toStart) void
void
detach()
extractContents.boolean
getCommonAncestorContainer.int
getCompareBoundaryPoints
(int how, Range sourceRange) compareBoundaryPoints.getEndContainer.int
getStartContainer.int
void
insertNode
(Node newNode) void
selectNode
(Node refNode) void
selectNodeContents
(Node refNode) void
void
setEndAfter
(Node refNode) void
setEndBefore
(Node refNode) void
void
setStartAfter
(Node refNode) void
setStartBefore
(Node refNode) void
surroundContents
(Node newParent) toString()
-
Field Details
-
START_TO_START
static final short START_TO_START- See Also:
-
START_TO_END
static final short START_TO_END- See Also:
-
END_TO_END
static final short END_TO_END- See Also:
-
END_TO_START
static final short END_TO_START- See Also:
-
-
Method Details
-
getStartContainer
getStartContainer.
- Returns:
- a
Node
object. - Throws:
DOMException
-
getStartOffset
- Throws:
DOMException
-
getEndContainer
getEndContainer.
- Returns:
- a
Node
object. - Throws:
DOMException
-
getEndOffset
- Throws:
DOMException
-
getCollapsed
- Throws:
DOMException
-
createContextualFragment
-
getCommonAncestorContainer
getCommonAncestorContainer.
- Returns:
- a
Node
object. - Throws:
DOMException
-
setStart
- Throws:
RangeException
DOMException
-
setEnd
- Throws:
RangeException
DOMException
-
setStartBefore
- Throws:
RangeException
DOMException
-
setStartAfter
- Throws:
RangeException
DOMException
-
setEndBefore
- Throws:
RangeException
DOMException
-
setEndAfter
- Throws:
RangeException
DOMException
-
collapse
- Throws:
DOMException
-
selectNode
- Throws:
RangeException
DOMException
-
selectNodeContents
- Throws:
RangeException
DOMException
-
getCompareBoundaryPoints
compareBoundaryPoints.
- Parameters:
how
-sourceRange
- aRange
object.- Returns:
- a
Integer
object. - Throws:
DOMException
-
deleteContents
- Throws:
DOMException
-
extractContents
extractContents.
- Returns:
- a
DocumentFragment
object. - Throws:
DOMException
-
cloneContents
cloneContents.
- Returns:
- a
DocumentFragment
object. - Throws:
DOMException
-
insertNode
- Throws:
DOMException
RangeException
-
surroundContents
- Throws:
DOMException
RangeException
-
cloneRange
- Throws:
DOMException
-
toString
- Overrides:
toString
in classObject
- Throws:
DOMException
-
detach
- Throws:
DOMException
-
getClientRects
DOMRectList getClientRects() -
getBoundingClientRect
DOMRect getBoundingClientRect()
-