CaretPosition Class
A caret position (https://drafts.csswg.org/cssom-view/#caretposition): a node and an offset in it, returned by Document.CaretPositionFromPoint.
public sealed class CaretPositionProperties
| Name | Description |
|---|---|
| Offset | Gets the offset of the caret position in its node (https://drafts.csswg.org/cssom-view/#dom-caretposition-offset). |
| OffsetNode | Gets the node of the caret position (https://drafts.csswg.org/cssom-view/#dom-caretposition-offsetnode). |
Offset
CaretPosition.csGets the offset of the caret position in its node (https://drafts.csswg.org/cssom-view/#dom-caretposition-offset).
public uint Offset { get; }OffsetNode
CaretPosition.csGets the node of the caret position (https://drafts.csswg.org/cssom-view/#dom-caretposition-offsetnode).
public Node OffsetNode { get; }Methods
| Name | Description |
|---|---|
| GetClientRect() | Returns the rectangle of the caret (https://drafts.csswg.org/cssom-view/#dom-caretposition-getclientrect): the bounding rectangle of the collapsed range of the caret position (see Range.GetBoundingClientRect), or null when the node is not in a document anymore. |
GetClientRect()
CaretPosition.csReturns the rectangle of the caret (https://drafts.csswg.org/cssom-view/#dom-caretposition-getclientrect): the bounding rectangle of the collapsed range of the caret position (see Range.GetBoundingClientRect), or null when the node is not in a document anymore.
public DomRect? GetClientRect()