Locate the current position of the caret. A plain JavaScript version of Caret.js.
github.com/deshiknaves/caret-pos
deshiknaves/caret-pos