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

[whatwg] Control over selection direction

From: Marijn Haverbeke <marijnh@gmail.com>
Date: Thu, 13 Jan 2011 09:48:54 +0100
Message-ID: <AANLkTimPwnp4aVLYNhShF13XmYybv6q=gXf=5jGS1urJ@mail.gmail.com>
> Rather than a single string property, how about integer
> selectionAnchor and selectionFocus properties? This is then analogous
> to Selection's anchorNode, anchorOffset, focusNode and focusOffset
> properties and avoids an awkward string property.

That seems to introduce the problem of having this integer match up
with one of the ends. It's not a big problem, you could just ignore
values that don't correspond to an end, but it seems to add
unnecessary conceptual noise, since this is simply a two-valued piece
of state. I don't think strings are all that awkward, but I guess
that's a taste thing.
Received on Thursday, 13 January 2011 00:48:54 UTC

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