CaretPosition
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The CaretPosition interface represents the caret position, an indicator for the text insertion point. You can get a CaretPosition using the Document.caretPositionFromPoint() method.
Properties
This interface doesn't inherit any properties.
CaretPosition.offsetNodeRead only-
Returns a
Nodecontaining the found node at the caret's position. CaretPosition.offsetRead only-
Returns a
longrepresenting the character offset in the caret position node.
Methods
CaretPosition.getClientRect-
Returns the client rectangle for the caret range.
Specifications
| Specification |
|---|
| CSSOM View Module # caret-position |
Browser compatibility
BCD tables only load in the browser