Web features explorer

Selection composed ranges

Newly Available (since 2025-08-19)
Expected to be Widely Available on 2028-02-19

The window.getSelection().getComposedRanges() method returns ranges that represent the current user selection, even if the selection spans across shadow tree boundaries.

Browser support

  • Chrome 137 Released on 2025-05-27
  • Chrome Android 137 Released on 2025-05-27
  • Edge 137 Released on 2025-05-29
  • Firefox 142 Released on 2025-08-19
  • Firefox for Android 142 Released on 2025-08-19
  • Safari 17 Released on 2023-09-18
  • Safari on iOS 17 Released on 2023-09-18