Re: [w3c/selection-api] Clarify association between a selection and its range (#2)

Hi @rniwa! With the currently specced getComposedRanges(), I believe this issue is a blocker and should be resolved.

The spec is being vague about the type of Range is associated to the Selection. In Blink (and likely all browsers), this is a Live Range and responds to DOM Mutations accordingly. However, as pointed above, if we want to support composed range, we cannot have it as a live range.

I propose we clarify the above definition to:

"Once a selection is associated with a given **live range** range, it must continue to be associated with that same range until this specification requires otherwise."

But also add new definitions in Selection:
* composed focus
* composed anchor

Which should default to focus/anchor, but can be set when selection crosses shadow trees. And these are the endpoints we use to compute getComposedRanges.

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

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

Received on Monday, 21 October 2024 21:32:08 UTC