Is there a way to get a floating webview back into focus?

I have a floating webview that listens to keypress events to fire some named triggers.
A couple of the triggers activate and move an application window. The problem i'm having is, the webview wont listen to keypress events anymore since it lost focus to the app that i moved... is there a way to refocus the webview programaticaly?

Appreciate any help, thank you.