W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2011

[whatwg] selection.modify behavior across platforms

From: Aryeh Gregor <Simetrical+w3c@gmail.com>
Date: Tue, 29 Mar 2011 14:26:19 -0400
Message-ID: <AANLkTik1zG4mje6i4qdeYUwemdxYgDr0HV6SGe0G41Er@mail.gmail.com>
On Mon, Mar 28, 2011 at 7:09 PM, Ehsan Akhgari <ehsan at mozilla.com> wrote:
> I was talking about the way that the spell checking dialog works in OpenOffice Writer, for example. ?The selection would be visible on the screen, and its contents might get changed if the user chooses to. ?But spell checking is just one example where Selection.modify might be useful. ?Let's not get distracted from the main discussion.

I'd say figuring out what are use-cases are is the first step we
should be having in the main discussion, because without that, we
won't have any basis on which to decide how the feature should work.

> Here's a possible use case: https://bugzilla.mozilla.org/show_bug.cgi?id=496275#c10

The use-case suggested there is to expose to authors a generic way of
detecting word/sentence boundaries across languages.  For this
use-case, you certainly want platform-independent behavior, but you
also wouldn't want the API to be tied to selections.  You'd want to be
able to do things like count the number of words of sentences in a run
of text, that sort of thing.  So Range would be a better place to put
it.  Or maybe it would be better to expose it as an API that operates
only on strings, without touching the DOM at all.  Depends what people
would want to use the API for.
Received on Tuesday, 29 March 2011 11:26:19 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC