@Generated(value="org.realityforge.webtack")
@JsType(isNative=true,
namespace="<global>",
name="Range")
public class Range
extends AbstractRange
| Modifier and Type | Field and Description |
|---|---|
static int |
END_TO_END |
static int |
END_TO_START |
static int |
START_TO_END |
static int |
START_TO_START |
| Constructor and Description |
|---|
Range()
The Range() constructor returns a newly created Range object whose start and end is the global Document object.
|
| Modifier and Type | Method and Description |
|---|---|
DocumentFragment |
cloneContents()
The Range.cloneContents() returns a DocumentFragment copying the objects of type Node included in the Range.
|
Range |
cloneRange()
The Range.cloneRange() method returns a Range object with boundary points identical to the cloned Range.
|
void |
collapse()
The Range.collapse() method collapses the Range to one of its boundary points.
|
void |
collapse(boolean toStart)
The Range.collapse() method collapses the Range to one of its boundary points.
|
Node |
commonAncestorContainer()
The Range.commonAncestorContainer read-only property returns the deepest — or furthest down the document tree — Node that contains both boundary points of the Range.
|
short |
compareBoundaryPoints(int how,
Range sourceRange)
The Range.compareBoundaryPoints() method compares the boundary points of the Range with those of another range.
|
short |
comparePoint(Node node,
int offset)
The Range.comparePoint() method returns -1, 0, or 1 depending on whether the referenceNode is before, the same as, or after the Range.
|
DocumentFragment |
createContextualFragment(java.lang.String fragment)
The Range.createContextualFragment() method returns a DocumentFragment by invoking the HTML fragment parsing algorithm or the XML fragment parsing algorithm with the start of the range (the parent of the selected node) as the context node.
|
void |
deleteContents()
The Range.deleteContents() method removes the contents of the Range from the Document.
|
void |
detach()
The Range.detach() method does nothing.
|
DocumentFragment |
extractContents()
The Range.extractContents() method moves contents of the Range from the document tree into a DocumentFragment.
|
DOMRect |
getBoundingClientRect()
The Range.getBoundingClientRect() method returns a DOMRect object that bounds the contents of the range; this is a rectangle enclosing the union of the bounding rectangles for all the elements in the range.
|
DOMRectList |
getClientRects()
The Range.getClientRects() method returns a list of DOMRect objects representing the area of the screen occupied by the range.
|
void |
insertNode(Node node)
The Range.insertNode() method inserts a node at the start of the Range.
|
boolean |
intersectsNode(Node node)
The Range.intersectsNode() method returns a boolean indicating whether the given Node intersects the Range.
|
boolean |
isPointInRange(Node node,
int offset)
The Range.isPointInRange() method returns a boolean indicating whether the given point is in the Range.
|
void |
selectNode(Node node)
The Range.selectNode() method sets the Range to contain the Node and its contents.
|
void |
selectNodeContents(Node node)
The Range.selectNodeContents() method sets the Range to contain the contents of a Node.
|
void |
setEnd(Node node,
int offset)
The Range.setEnd() method sets the end position of a Range to be located at the given offset into the specified node x.Setting the end point above (higher in the document) than the start point will result in a collapsed range with the start and end points both set to the specified end position.
|
void |
setEndAfter(Node node)
The Range.setEndAfter() method sets the end position of a Range relative to another Node.
|
void |
setEndBefore(Node node)
The Range.setEndBefore() method sets the end position of a Range relative to another Node.
|
void |
setStart(Node node,
int offset)
The Range.setStart() method sets the start position of a Range.
|
void |
setStartAfter(Node node)
The Range.setStartAfter() method sets the start position of a Range relative to a Node.
|
void |
setStartBefore(Node node)
The Range.setStartBefore() method sets the start position of a Range relative to another Node.
|
void |
surroundContents(Node newParent)
The Range.surroundContents() method moves content of the Range into a new node, placing the new node at the start of the specified range.
|
collapsed, endContainer, endOffset, startContainer, startOffsetassign, create, create, defineProperties, defineProperty, defineProperty, entries, freeze, fromEntries, getOwnPropertyDescriptor, getOwnPropertyDescriptor, getOwnPropertyDescriptors, getOwnPropertyNames, getOwnPropertySymbols, getPrototypeOf, is, isExtensible, isFrozen, isSealed, keys, preventExtensions, seal, setPrototypeOf, valueOf_, values@JsOverlay public static final int END_TO_END
@JsOverlay public static final int END_TO_START
@JsOverlay public static final int START_TO_END
@JsOverlay public static final int START_TO_START
public Range()
@JsProperty(name="commonAncestorContainer") @Nonnull public Node commonAncestorContainer()
@Nonnull public DocumentFragment cloneContents()
@Nonnull public Range cloneRange()
public void collapse(boolean toStart)
public void collapse()
public short compareBoundaryPoints(@RangeCompareType int how, @Nonnull Range sourceRange)
public short comparePoint(@Nonnull
Node node,
int offset)
public void deleteContents()
public void detach()
@Nonnull public DocumentFragment extractContents()
public void insertNode(@Nonnull
Node node)
public boolean intersectsNode(@Nonnull
Node node)
public boolean isPointInRange(@Nonnull
Node node,
int offset)
public void selectNode(@Nonnull
Node node)
public void selectNodeContents(@Nonnull
Node node)
public void setEnd(@Nonnull
Node node,
int offset)
public void setEndAfter(@Nonnull
Node node)
public void setEndBefore(@Nonnull
Node node)
public void setStart(@Nonnull
Node node,
int offset)
public void setStartAfter(@Nonnull
Node node)
public void setStartBefore(@Nonnull
Node node)
public void surroundContents(@Nonnull
Node newParent)
@Nonnull public DOMRect getBoundingClientRect()
@Nonnull public DOMRectList getClientRects()
@Nonnull public DocumentFragment createContextualFragment(@Nonnull java.lang.String fragment)