- From: Mason Freed <notifications@github.com>
- Date: Wed, 01 Dec 2021 09:32:22 -0800
- To: WICG/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 1 December 2021 17:32:35 UTC
Great, sounds like no objections to exposing `direction` on `Selection` - I'll add that to the proposal text. > @mfreed7 this looks pretty good to me overall. One thing that would be great to see flushed out a bit more is the data model (which I realize is currently lacking as well). Is the idea that `Selection` holds a **true range** and `Range` holds a **selection** (null or a `Selection`) and when mutating `Range`, if it has a non-null selection, we'd use the `Range`'s selection's true range in various ways? Glad you think it looks ok also! I allude to this in [this section of the explainer](https://github.com/mfreed7/shadow-dom-selection#changes-to-existing-selection-apis), but generally I think the answer is "yes". I've been thinking of it as if `Selection` holds the **true range** as you said, but `Range` is a *view* into that **true range**. Mutations to the `Range` will reach through and mutate the **true range** in the [prescribed ways](https://github.com/mfreed7/shadow-dom-selection#mutability-of-live-ranges-returned-from-getrangeat). I'm open to suggestions about how to better document this data model. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/WICG/webcomponents/issues/79#issuecomment-983868870
Received on Wednesday, 1 December 2021 17:32:35 UTC