You may be able to do something in WebKit (and apparently Firefox 4) by using the modify method of the selection in conjunction with the mousemove
event. It'll probably be quite tricky to get right though: you'll need to consider when it's appropriate to expand the selection.
Here's a very simple example of using the modify
method:
<p>A paragraph with some nice text in it</p>
<script type="text/javascript">
function expandSelection() {
var sel;
if (window.getSelection) {
sel = window.getSelection();
if (sel.modify) {
sel.modify("extend", "forward", "word");
}
}
}
</script>
<input type="button" onclick="expandSelection();" value="expand">