I've not found the answer of my question, so I come to you.
I need to retrieve the selected text in a particularly div when pushing on the F8 key on the keyboard.
Problem, I can get the selected text in the entire document (with window.getSelection()), but is there a way to retrieve the text if and only if the selected text is the div?
Thank you for your answer