On 13 January 2011 08:48, Marijn Haverbeke <mari...@gmail.com> wrote: >> 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.
Fair enough, I think you may be right. Given that this is a binary property of the selection state, how about a a Boolean `selectionBackwards` property? Tim