Class CaretPosition
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
The CaretPosition interface represents the caret position, an indicator for the text insertion point.
You can get a CaretPosition using the CaretPositionFromPoint(Number, Number, CaretPositionFromPointOptions) method.
[Value("CaretPosition")]
public class CaretPosition
- Inheritance
-
CaretPosition
- Inherited Members
Remarks
Constructors
CaretPosition()
public CaretPosition()
Properties
Offset
The offset property of the CaretPosition interface returns an integer representing the offset of the selection in the caret position node.
[Value("offset")]
public ulong Offset { get; }
Property Value
- ulong
An integer.
Remarks
This will be the character offset in a text node or the selected child node's index in an element node.
-Node
-CaretPositionFromPoint(Number, Number, CaretPositionFromPointOptions)
OffsetNode
The offsetNode property of the CaretPosition interface returns a Node containing the found node at the caret's position.
[Value("offsetNode")]
public Node OffsetNode { get; }
Property Value
Remarks
Methods
GetClientRect()
The getClientRect() method of the CaretPosition interface returns the client rectangle for the caret range.
[Value("getClientRect")]
public DOMRect? GetClientRect()