How to check what text the user highlighted?

Responses like this is hardly cross platform.

Maybe there are packages which?
Or use something like this will work everywhere?
April 4th 20 at 00:32
2 answers
April 4th 20 at 00:34
Solution
https://caniuse.com/#search=getSelection
roughly speaking, the work should be at least 80% of all browsers, the old ancient, which almost never occurs unless you understand it... well I not bother...

Find more questions by tags JavaScript