Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FF131Relnote: Document.caretPositionFromPoint() updated for shadow DOM #35912

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hamishwillee
Copy link
Collaborator

FF131 adds support for "new shadow dom behaviour" in Document.caretPositionFromPoint() in https://bugzilla.mozilla.org/show_bug.cgi?id=1914596

Essentially this means a new option, called options has been added the the api, along with x, y. The option allows a caller to supply a list of shadow roots, which allows the caret position to be resolved (or not, if not supplied).
This just adds the release note.

Related docs work can be tracked in #35702

@hamishwillee hamishwillee requested a review from a team as a code owner September 17, 2024 05:57
@hamishwillee hamishwillee requested review from pepelsbey and removed request for a team September 17, 2024 05:57
@github-actions github-actions bot added Content:Firefox Content in the Mozilla/Firefox subtree size/xs [PR only] 0-5 LoC changed labels Sep 17, 2024
Copy link
Contributor

Preview URLs

External URLs (1)

URL: /en-US/docs/Mozilla/Firefox/Releases/131
Title: Firefox 131 for developers

@@ -45,6 +45,7 @@ This article provides information about the changes in Firefox 131 that affect d
- The {{domxref('PointerEvent.altitudeAngle','altitudeAngle')}} and {{domxref('PointerEvent.azimuthAngle','azimuthAngle')}} properties of the {{domxref('PointerEvent')}} interface are supported, providing the angle between the pointer/stylus and the screen (X-Y plane), and the rotation of the stylus over the screen relative to its x-axis, respectively. ([Firefox bug 1656377](https://bugzil.la/1656377)).
- [Text fragments](/en-US/docs/Web/URI/Fragment/Text_fragments) are now supported, allowing users to link to and highlight specific portions of text in a web page. This feature uses a particular syntax in the [URL fragment](/en-US/docs/Web/URI/Fragment) that identifies the target based on patterns in the rendered text.
Website developers can also use the existence of the {{domxref("Document.fragmentDirective")}} property (an instance of the {{domxref("FragmentDirective")}} interface) to feature check for text fragment support, and the {{CSSxRef("::target-text")}} pseudo element to select and style text that has been selected using a text fragment link. ([Firefox bug 1914877](https://bugzil.la/1914877))
- The {{domxref('Document/caretPositionFromPoint','caretPositionFromPoint()')}} method of the {{domxref("Document")}} interface has been updated so that it can return the text node and offset for a caret position within a shadow DOM, provided the shadow root has been supplied to the method. ([Firefox bug 1914596](https://bugzil.la/1914596)).
Copy link
Member

@pepelsbey pepelsbey Sep 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d mention that it has been updated to include a third argument. Currently, it focuses on the return value, but there used to be only two arguments, which is also new.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Firefox Content in the Mozilla/Firefox subtree size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants