public class RangeImpl extends Object implements org.w3c.dom.ranges.Range
Modifier and Type | Field and Description |
---|---|
static int |
END_TO_END |
static int |
END_TO_START |
static int |
NODE_AFTER |
static int |
NODE_BEFORE |
static int |
NODE_BEFORE_AND_AFTER |
static int |
NODE_INSIDE |
static int |
START_TO_END |
static int |
START_TO_START |
public static final int START_TO_START
public static final int START_TO_END
public static final int END_TO_END
public static final int END_TO_START
public static final int NODE_BEFORE
public static final int NODE_AFTER
public static final int NODE_BEFORE_AND_AFTER
public static final int NODE_INSIDE
public Node getStartContainer()
getStartContainer
in interface org.w3c.dom.ranges.Range
public int getStartOffset()
getStartOffset
in interface org.w3c.dom.ranges.Range
public Node getEndContainer()
getEndContainer
in interface org.w3c.dom.ranges.Range
public int getEndOffset()
getEndOffset
in interface org.w3c.dom.ranges.Range
public boolean getCollapsed()
getCollapsed
in interface org.w3c.dom.ranges.Range
public Node getCommonAncestorContainer()
getCommonAncestorContainer
in interface org.w3c.dom.ranges.Range
public String getText()
public void setStart(Node refNode, int offset) throws DOMException
setStart
in interface org.w3c.dom.ranges.Range
DOMException
public void setEnd(Node refNode, int offset) throws DOMException
setEnd
in interface org.w3c.dom.ranges.Range
DOMException
public void setStartBefore(Node refNode) throws DOMException
setStartBefore
in interface org.w3c.dom.ranges.Range
DOMException
public void setStartAfter(Node refNode) throws DOMException
setStartAfter
in interface org.w3c.dom.ranges.Range
DOMException
public void setEndBefore(Node refNode) throws DOMException
setEndBefore
in interface org.w3c.dom.ranges.Range
DOMException
public void setEndAfter(Node refNode) throws DOMException
setEndAfter
in interface org.w3c.dom.ranges.Range
DOMException
public void collapse(boolean toStart)
collapse
in interface org.w3c.dom.ranges.Range
public void selectNode(Node refNode) throws DOMException
selectNode
in interface org.w3c.dom.ranges.Range
DOMException
public void selectNodeContents(Node refNode) throws DOMException
selectNodeContents
in interface org.w3c.dom.ranges.Range
DOMException
public short compareBoundaryPoints(short how, org.w3c.dom.ranges.Range sourceRange) throws DOMException
compareBoundaryPoints
in interface org.w3c.dom.ranges.Range
DOMException
public void deleteContents() throws DOMException
deleteContents
in interface org.w3c.dom.ranges.Range
DOMException
public DocumentFragment extractContents() throws DOMException
extractContents
in interface org.w3c.dom.ranges.Range
DOMException
public DocumentFragment cloneContents() throws DOMException
cloneContents
in interface org.w3c.dom.ranges.Range
DOMException
public void insertNode(Node newNode) throws DOMException
insertNode
in interface org.w3c.dom.ranges.Range
DOMException
public void surroundContents(Node newParent) throws DOMException
surroundContents
in interface org.w3c.dom.ranges.Range
DOMException
public org.w3c.dom.ranges.Range cloneRange()
cloneRange
in interface org.w3c.dom.ranges.Range
public String toString()
toString
in interface org.w3c.dom.ranges.Range
toString
in class Object
public void detach()
detach
in interface org.w3c.dom.ranges.Range
public DocumentFragment createContextualFragment(String html) throws DOMException
DOMException
public short compareNode(Node refNode) throws DOMException
DOMException
public short comparePoint(Node refNode, int offset) throws DOMException
DOMException
public boolean intersectsNode(Node refNode) throws DOMException
DOMException
public boolean isPointInRange(Node refNode, int offset) throws DOMException
DOMException
public void expand(String unit) throws DOMException
DOMException
Copyright © 2020. All rights reserved.