While the non-modal Wiktionary window is shown, we need to continually query the WebView to determine the current text highlight, so that the definition that is shown in the window is updated to reflect the highlighted text.
I would envision this to work as follows:
- While the Wiktionary window is shown, send a message to the WebView once per second to retrieve the current highlighted text.
- Catch the WebView's response, and show the highlighted selection in the floating window.