[w3c/selection-api] Feature: API to convert Selection into a URL (Issue #362)

martinthomson created an issue (w3c/selection-api#362)

## Use case

I have an application that annotates selections of an active document. Those annotations will live outside of the document.  I want to be able to provide a reference to the specific selection as [a text fragment URL](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Fragment/Text_fragments).

## Possible solution

The `Selection` interface provides a bunch of helpful hooks, but the process that might produce a text fragment URL is pretty complicated.  Implementing that is something I could ask an LLM to do at the cost of significant application complexity, or, because they already have that code, the browser could help.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/362
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/selection-api/issues/362@github.com>

Received on Friday, 16 October 2026 03:40:24 UTC