[whatwg] Control over selection direction
Marijn Haverbeke
marijnh at gmail.com
Fri Jan 14 02:16:03 PST 2011
Another relevant precedent is window.getSelection().modify (Webkit and
Gecko-2 specific), which uses the strings "forward" and "backward" to
specify the direction in which to alter the selection. English is not
my native language, and I'm not sure what the semantic difference
between "forward" and "forwards" is, but I do expect people to
misremember which one we end up using, and use the other one. Would it
make sense to accept both the with-s and the without-s versions, or is
that kind of do-what-mean stuff not HTML5-style?
(This .modify method can, by the way, already be used, on the browsers
that support it, to create reversed selections by setting a collapsed
selection at the end of the desired selection, and then calling
getSelection().modify("extend", "backward", "character") X times to
adjust the start to the desired point. This is, unfortunately,
horribly slow, and quite clunky.)
More information about the whatwg
mailing list