files/en-us/web/api/caretposition/index.md
{{APIRef("CSSOM view API")}}
The CaretPosition interface represents the caret position, an indicator for the text insertion point.
You can get a CaretPosition using the {{domxref("Document.caretPositionFromPoint()")}} method.
This interface doesn't inherit any properties.
long representing the offset of the selection in the caret position node.
This will be the character offset in a text node or the selected child node's index in an element node.{{Specifications}}
{{Compat}}