CaretPosition
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
CaretPosition
インターフェイスは、テキスト挿入ポイントのインジケーターであるキャレット位置を表します。
CaretPosition
は Document.caretPositionFromPoint()
メソッドを使用して取得できます。
インスタンスプロパティ
このインターフェイスはプロパティを継承していません。
CaretPosition.offsetNode
読取専用-
キャレットの位置で見つかったノードを含む
Node
を返します。 CaretPosition.offset
読取専用-
キャレット位置ノード内の選択位置のオフセットを表す
long
を返します。 これは、テキストノードでは文字のオフセット、要素ノードでは選択された子ノードのインデックスになります。
インスタンスメソッド
CaretPosition.getClientRect
-
キャレット範囲のクライアント長方形を返します。
仕様書
Specification |
---|
CSSOM View Module # caret-position |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CaretPosition | ||||||||||||
getClientRect | ||||||||||||
offset | ||||||||||||
offsetNode |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.