Skip to content

Commit

Permalink
FF131 document.caretPositionFromPoint() - support for shadow DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishwillee committed Sep 20, 2024
1 parent 8374946 commit c0be17d
Show file tree
Hide file tree
Showing 2 changed files with 336 additions and 20 deletions.
6 changes: 4 additions & 2 deletions files/en-us/web/api/caretposition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ browser-compat: api.CaretPosition

{{ APIRef("CSSOM") }}

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

## Instance properties

Expand All @@ -16,7 +17,8 @@ _This interface doesn't inherit any properties._
- {{domxref("CaretPosition.offsetNode")}} {{ReadOnlyInline}}
- : Returns a {{domxref("Node")}} containing the found node at the caret's position.
- {{domxref("CaretPosition.offset")}} {{ReadOnlyInline}}
- : Returns a `long` representing the character offset in the caret position node.
- : Returns a `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.

## Instance methods

Expand Down
Loading

0 comments on commit c0be17d

Please sign in to comment.