Class AbstractRange
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The AbstractRange abstract interface is the base class upon which all DOM range types are defined. A range is an object that indicates the start and end points of a section of content within the document.
[Value("AbstractRange")]
public class AbstractRange
- Inheritance
-
AbstractRange
- Derived
- Inherited Members
Remarks
NOTE
As an abstract interface, you will not directly instantiate an object of type
AbstractRange. Instead, you will use the Range or StaticRange interfaces. To understand the difference between those two interfaces, and how to choose which is appropriate for your needs, consult each interface's documentation.
Constructors
AbstractRange()
public AbstractRange()
Properties
Collapsed
The read-only collapsed property of the AbstractRange interface returns true if the range's start position and end position are the same.
[Value("collapsed")]
public bool Collapsed { get; }
Property Value
- bool
A boolean value which is
trueif the range is collapsed. A collapsed range is one in which the start and end positions are the same, resulting in a zero-character-long range.
Remarks
A collapsed range is empty (containing no content), and specifies a single point in a DOM tree. To collapse a range, see the Collapse(bool) method.
EndContainer
The read-only endContainer property of the AbstractRange interface returns the Node in which the end of the range is located.
[Value("endContainer")]
public Node EndContainer { get; }
Property Value
Remarks
To change the end position, use the SetEnd(Node, ulong) method or a similar one.
EndOffset
The endOffset property of the AbstractRange interface returns the offset into the end node of the range's end position.
[Value("endOffset")]
public ulong EndOffset { get; }
Property Value
- ulong
An integer value indicating the number of characters into the Node indicated by EndContainer at which the final character of the range is located.If the
endContaineris a Node of type Text, Comment, or CDATASection, then the offset is the number of characters from the start of theendContainerto the boundary point of the range. For other Node types, theendOffsetis the number of child nodes between the start of theendContainerand the boundary point of the range.
Remarks
To change the end position, use the SetEnd(Node, ulong) method or a similar one.
StartContainer
The read-only startContainer property of the AbstractRange interface returns the Node in which the start of the range is located.
[Value("startContainer")]
public Node StartContainer { get; }
Property Value
Remarks
To change the start position, use the SetStart(Node, ulong) method or a similar one.
StartOffset
The read-only startOffset property of the AbstractRange interface returns the offset into the start node of the range's start position.
[Value("startOffset")]
public ulong StartOffset { get; }
Property Value
- ulong
An integer value indicating the number of characters into the Node indicated by StartContainer at which the first character of the range is located.If the
startContaineris a Node of type Text, Comment, or CDATASection, then the offset is the number of characters from the start of thestartContainerto the boundary point of the range. For other Node types, thestartOffsetis the number of child nodes between the start of thestartContainerand the boundary point of the range.
Remarks
To change the start position, use the SetStart(Node, ulong) method or a similar one.