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

FF131 Document.caretPositionFromPoint() has new option #24405

Merged
merged 1 commit into from
Sep 12, 2024

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Sep 10, 2024

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).
Chrome implemented this in their first release (128), but FF implemented the API in FF20, so this is a compatibility difference. I've added the option as a method subfeature.

Related docs work can be tracked in mdn/content#35702

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Sep 10, 2024
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

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

Thanks Hamish! I think adding the tag makes sense as web developers want to use the API as defined per the latest spec with the options parameter.

@Elchi3 Elchi3 merged commit c3a2f42 into mdn:main Sep 12, 2024
5 checks passed
@hamishwillee hamishwillee deleted the ff131document_caretPositionFromPoint branch September 12, 2024 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants