0

Like I am viewing a webpage which is full of words, can I get exactly which word I am reading by providing the coordinate of my gazing?

I know document.elementFromPoint can tell the tag, but I need more preciously till word level.

I just wanna run my code as a Chrome plugin. So the Chrome-only functions are also okay.

speedcell4
  • 666
  • 8
  • 23
  • Possible duplicate of 'Get DOM text node from point?' http://stackoverflow.com/questions/13597157/get-dom-text-node-from-point – Robin Mackenzie Jun 03 '16 at 15:00
  • @Robin No, not duplicate. I want the exact word instead of the whole tag. that link returns tags. – speedcell4 Jun 03 '16 at 15:09
  • Also a possible duplicate of this one http://stackoverflow.com/questions/2444430/how-to-get-a-word-under-cursor-using-javascript – Lud Jun 03 '16 at 16:29
  • http://stackoverflow.com/questions/5143534/get-the-position-of-text-within-an-element – levi Jun 03 '16 at 17:06

0 Answers0