Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. CaretPosition

CaretPosition

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

TheCaretPosition interface represents the caret position, an indicator for the text insertion point.You can get aCaretPosition using theDocument.caretPositionFromPoint() method.

Instance properties

This interface doesn't inherit any properties.

CaretPosition.offsetNodeRead only

Returns aNode containing the found node at the caret's position.

CaretPosition.offsetRead only

Returns along 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.

Instance methods

CaretPosition.getClientRect

Returns the client rectangle for the caret range.

Specifications

Specification
CSSOM View Module
# caret-position

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp