- From: Jonas Sicking <jonas@sicking.cc>
- Date: Thu, 17 Oct 2013 15:36:54 -0700
- To: Travis Leithead <travis.leithead@microsoft.com>
- Cc: Hajime Morrita <morrita@google.com>, Ryosuke Niwa <rniwa@apple.com>, Sudarshan <sudarshan.p@samsung.com>, Webapps WG <public-webapps@w3.org>
On Thu, Oct 17, 2013 at 12:24 PM, Travis Leithead <travis.leithead@microsoft.com> wrote: > From: Jonas Sicking [mailto:jonas@sicking.cc] > >> Though I'd also be interested to hear how other implementations feel about the Gecko solution of allowing selection to be comprised of multiple DOM Ranges. > > Seems totally reasonable; only problem is that pretty much all content on the web assumes one range per selection: getSelection().getRangeAt(0); and this programmatic selection-extraction would miss part of the selection if it were broken up. Ideally not the what that code should be doing, but since user-multi-selection isn't interoperable, there's no critical mass to change this practice, in practice. I think that is fine that code that is completely unaware of shadow content gets weird results when a selection spans shadow content. I.e. that it would see only the Nodes that lives in the main Document tree. There is nothing we can do to make such code work perfectly. Of course, the better we can make it, the better :) So if we add support on the Range interface for having "subranges" that live in the shadow tree, maybe we can get better results from functions like toString() and cloneContents(). / Jonas
Received on Thursday, 17 October 2013 22:37:52 UTC