public class Range extends SimpleScriptable
| Constructor and Description |
|---|
Range()
Create an instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected List |
getAncestorsAndSelf(Node node)
Gets the ancestors of the node
|
void |
jsxFunction_collapse(boolean toStart)
Collapse a Range onto one of its boundary-points
|
Object |
jsxFunction_createContextualFragment(String fragment)
Parses an html snippet.
|
void |
jsxFunction_selectNode(Node refNode)
Select a node and its contents
|
void |
jsxFunction_selectNodeContents(Node refNode)
Select the contents within a node
|
void |
jsxFunction_setEnd(Node refNode,
int offset)
Sets the attributes describing the end of a Range.
|
void |
jsxFunction_setEndAfter(Node refNode)
Sets the end of the range to be after the node
|
void |
jsxFunction_setEndBefore(Node refNode)
Sets the end of the range to be before the node
|
void |
jsxFunction_setStart(Node refNode,
int offset)
Sets the attributes describing the start of a Range.
|
void |
jsxFunction_setStartAfter(Node refNode)
Sets the start of the range to be after the node
|
void |
jsxFunction_setStartBefore(Node refNode)
Sets the start of the range to be before the node
|
boolean |
jsxGet_collapsed()
Indicates if the range is collapsed
|
Object |
jsxGet_commonAncestorContainer()
Gets the deepest common ancestor container of the Range's two boundary-points.
|
Object |
jsxGet_endContainer()
Gets the node within which the Range ends.
|
int |
jsxGet_endOffset()
Gets the offset within the end node of the Range.
|
Object |
jsxGet_startContainer()
Gets the node within which the Range begins.
|
int |
jsxGet_startOffset()
Gets the offset within the starting node of the Range.
|
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getIntArg, getLog, getObjectArg, getPrototype, getScriptableFor, getStartingScope, getStringArg, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, makeScriptableFor, setDomNode, setDomNode, setHtmlElementassociateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototypepublic Object jsxGet_startContainer()
undefined if not initializedpublic Object jsxGet_endContainer()
undefined if not initializedpublic int jsxGet_startOffset()
0 if not initializedpublic int jsxGet_endOffset()
0 if not initializedpublic void jsxFunction_setStart(Node refNode, int offset)
refNode - the reference nodeoffset - the offset value within the nodepublic void jsxFunction_setStartAfter(Node refNode)
refNode - the reference nodepublic void jsxFunction_setStartBefore(Node refNode)
refNode - the reference nodepublic boolean jsxGet_collapsed()
true if the range is collapsedpublic void jsxFunction_setEnd(Node refNode, int offset)
refNode - the reference nodeoffset - the offset value within the nodepublic void jsxFunction_setEndAfter(Node refNode)
refNode - the reference nodepublic void jsxFunction_setEndBefore(Node refNode)
refNode - the reference nodepublic void jsxFunction_selectNodeContents(Node refNode)
refNode - Node to select frompublic void jsxFunction_selectNode(Node refNode)
refNode - the node to selectpublic void jsxFunction_collapse(boolean toStart)
toStart - If true, collapses the Range onto its start; else collapses it onto its end.public Object jsxGet_commonAncestorContainer()
protected List getAncestorsAndSelf(Node node)
node - the node to start withpublic Object jsxFunction_createContextualFragment(String fragment)
fragment - text that contains text and tags to be converted to a document fragment.Copyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.