In server side there is only DOM data from client, many things can be done in client side with pure JS code without breaking ItsNat syncs, this is the case of caret position read/modification, if you want to process in some way the caret pos in server you can send it as data attached to key events registered in server as explained by Ravin, or sending ItsNat custom events for more freedom or just do everything in browser with custom JS, ItsNat is a server centric "architectural" tool but it allows a big room for pure client side programming.