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

> If so, I suggest we redefine what a Live Range means. It isn't only if it implements the Range interface, but is for any object that implements the AbstractRange interface and that listens to DOM mutations.

I personally don't think this is necessary. I think we could keep "live range" in DOM as-is (i.e., implementing the `Range` IDL interface), and introduce a new internal spec concept called "live composed range" that is just an internal concept; it doesn't implement any Web IDL interface, but is just used as a bookkeeping tool for the Selection API to derive other ranges from. It'd be used to derive [the `StaticRange` returned from `getComposedRange()`](https://w3c.github.io/selection-api/#dom-selection-getcomposedranges:~:text=Return%20an%20array%20consisting%20of%20new%20StaticRange%20whose%20start%20node%20is%20startNode%2C%20start%20offset%20is%20startOffset%2C%20end%20node%20is%20endNode%2C%20and%20end%20offset%20is%20endOffset), and [the "live range" (i.e., `Range`) returned by `getRangeAt(0)`](https://w3c.github.io/selection-api/#dom-selection-getrangeat).



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

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

Received on Saturday, 18 January 2025 14:04:12 UTC