Re: [w3c/selection-api] Support multi range selection (#41)

> Ranges are so much nicer in this situation since they update their offsets in response to mutations
> 3. robust even when DOM mutations occur

The problem is that it's impossible to create an API that adopts to DOM mutations as expected expect the simplest of the simplest of the case.

For example, what if the script removed the entire text node from `"[foo] bar [baz]"`, what should happen? For starters, for "foo" to be wrapped in a `b`, one has to split the text node. Range's boundary points don't (as currently spec'ed nor can we change their behavior due to backwards compatibilities) update themselves to refer to "foo" and "baz" after the split.

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

Received on Tuesday, 28 March 2017 21:15:33 UTC