I am developing an extension where I need to use window or document.getSelection() inside one of my content script.
I use React and I created a popup where I use lexical. In order to lexical to work properly I have to get the selection within my popup. So I don't need the selection in the webpage itself.
I tried to get the selection via scripting, but I hope there is a better way to get the selection inside my own component