Using javascript "window.getSelection()" on wix code ? (To get what the user highlithed)

Hey the Corvid community!
As the title suggests I am having troubles to get a selected text by the user.
I tried different ways but I don’t get how (or if) window.getSelection() works on Wix.

The more logical to me would have been:

import wixWindow from 'wix-window';
export function text_click(event) {
let selection = wixWindow.getSelction()

But of course it doesn’t work…wixWindow does not support “getSelection()”

Any idea from the experts? Any other way?

Infinite gratitude to whomever gives me a little bit of its brain matter :slight_smile:

If Wix Window supported getSelection, then it would be mentioned as one of the API’s functions in the Wix API reference,

This has been asked before and various advice was given, however nothing concrete.