web-feature: Selection composed ranges

baseline logo Widely available

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