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

Sorry, I know we decided to introduce the concept of "live composed range", but the spec changes needed is still unclear to me.

Currently, the DOM definition:
> Objects implementing the [Range](https://dom.spec.whatwg.org/#range) interface are known as [lives ranges](https://dom.spec.whatwg.org/#concept-live-range).

Should we change to either:
A) `class Range final : public ComposedRange` and `class ComposedRange: public AbstractRange`
B) `class ComposedRange final : public Range` and `class Range: public AbstractRange`
C) `class ComposedRange final : public AbstractRange`

Further, currently the range associated to `Selection` is `Range`. Is the resolution to change this associated range to be `ComposedRange`? I am unsure how we can have only one `ComposedRange` range associated to the selection yet be able to return a `Range` when `getRangeAt(0)` is called.

(This is why I am thinking adding the internal concept of composed anchor/focus would be sufficient and easier. I am happy to add the concept of live composed range if there is a good way to implement it.)

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

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

Received on Monday, 21 October 2024 22:34:45 UTC