textnode-offset
Get the offset of a character by wrapping it in a textNode.
Demo
https://lab.miguelmota.com/textnode-offset
Install
npm install textnode-offset
bower install textnode-offset
Usage
Programs must be written for people to read, and only incidentally for machines to execute.
var parentElement = document;var index = 20;var offset = ; console;// "left": 148875 "top": 110875
License
MIT