Method from org.w3c.dom.ranges.Range Detail: |
public DocumentFragment cloneContents() throws DOMException
Duplicates the contents of a Range |
public Range cloneRange() throws DOMException
Produces a new Range whose boundary-points are equal to the
boundary-points of the Range. |
public void collapse(boolean toStart) throws DOMException
Collapse a Range onto one of its boundary-points |
public short compareBoundaryPoints(short how,
Range sourceRange) throws DOMException
Compare the boundary-points of two Ranges in a document. |
public void deleteContents() throws DOMException
Removes the contents of a Range from the containing document or
document fragment without returning a reference to the removed
content. |
public void detach() throws DOMException
Called to indicate that the Range is no longer in use and that the
implementation may relinquish any resources associated with this
Range. Subsequent calls to any methods or attribute getters on this
Range will result in a DOMException being thrown with an
error code of INVALID_STATE_ERR . |
public DocumentFragment extractContents() throws DOMException
Moves the contents of a Range from the containing document or document
fragment to a new DocumentFragment. |
public boolean getCollapsed() throws DOMException
TRUE if the Range is collapsed |
public Node getCommonAncestorContainer() throws DOMException
The deepest common ancestor container of the Range's two
boundary-points. |
public Node getEndContainer() throws DOMException
Node within which the Range ends |
public int getEndOffset() throws DOMException
Offset within the ending node of the Range. |
public Node getStartContainer() throws DOMException
Node within which the Range begins |
public int getStartOffset() throws DOMException
Offset within the starting node of the Range. |
public void insertNode(Node newNode) throws DOMException, RangeException
Inserts a node into the Document or DocumentFragment at the start of
the Range. If the container is a Text node, this will be split at the
start of the Range (as if the Text node's splitText method was
performed at the insertion point) and the insertion will occur
between the two resulting Text nodes. Adjacent Text nodes will not be
automatically merged. If the node to be inserted is a
DocumentFragment node, the children will be inserted rather than the
DocumentFragment node itself. |
public void selectNode(Node refNode) throws RangeException, DOMException
Select a node and its contents |
public void selectNodeContents(Node refNode) throws RangeException, DOMException
Select the contents within a node |
public void setEnd(Node refNode,
int offset) throws RangeException, DOMException
Sets the attributes describing the end of a Range. |
public void setEndAfter(Node refNode) throws RangeException, DOMException
Sets the end of a Range to be after a node |
public void setEndBefore(Node refNode) throws RangeException, DOMException
Sets the end position to be before a node. |
public void setStart(Node refNode,
int offset) throws RangeException, DOMException
Sets the attributes describing the start of the Range. |
public void setStartAfter(Node refNode) throws RangeException, DOMException
Sets the start position to be after a node |
public void setStartBefore(Node refNode) throws RangeException, DOMException
Sets the start position to be before a node |
public void surroundContents(Node newParent) throws DOMException, RangeException
Reparents the contents of the Range to the given node and inserts the
node at the position of the start of the Range. |
public String toString() throws DOMException
Returns the contents of a Range as a string. This string contains only
the data characters, not any markup. |