I am new to Google Extension programming.
I faced with a problem - how to get the coordinates of selected region? I am building some sort of translation app and when user select word, pop-up should appear nearby with word information.
Currently, I am getting selection via chrome.contextMenus.create
with "onclick"
event.
(like Get selected text in a chrome extension). And I assume to use chrome.tabs.executeScript
to run my pop-up code, but how to get selection coodinates (x, y) to position my pop-up?
Thank you for suggestion.