W3cubDocs

/DOM

CaretPosition

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The CaretPosition interface represents the caret postion, an indicator for the text insertion point. You can get a CaretPosition using the document.caretPositionFromPoint method.

Properties

This interface doesn't inherit any property.

CaretPosition.offsetNode Read only
Returns a Node containing the found node at the caret's position.
CaretPosition.offset Read only
Returns a long representing the character offset in the caret position node.

Methods

CaretPosition.getClientRect

Specification

Browser compatibility

Feature Chrome Firefox Internet Explorer Opera Safari
Basic support No support 20.0 (20.0) No support No support No support
Feature Android Firefox Mobile IE Phone Opera Mobile Safari Mobile
Basic support No support 20.0 (20.0) No support No support No support

See also

© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CaretPosition