[whatwg] Control over selection direction

Marijn Haverbeke marijnh at gmail.com
Thu Jan 13 00:48:54 PST 2011


> 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.



More information about the whatwg mailing list