Meet Selection.getComposedRanges() π
Unlike getRangeAt(), it returns selection ranges across Shadow DOM boundaries, essential for modern web components.
Since August 2025, this feature is Baseline.
Learn how it works π
https://developer.mozilla.org/en-US/docs/Web/API/Selection/getComposedRanges
MDN Web Docs
@mdn@mastodon.social
The official MDN Web Docs account. We deliver the best web docs around. Visit β https://mdn.dev Contribute β https://mdn.dev/community
mastodon.social
MDN Web Docs
@mdn@mastodon.social
The official MDN Web Docs account. We deliver the best web docs around. Visit β https://mdn.dev Contribute β https://mdn.dev/community
mastodon.social
@mdn@mastodon.social
Β·
Mar 09, 2026
5
0
0
Loading comments...