There's no good general purpose function to do that. If you specify which browser you're adding on to, there might be a specific workaround. When faced with this problem in the past, I had to resort to asking the user to double-click the word (then you can detect the double-click, get selection, and reset it back).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…