Add support for bringing window to foreground

after activation from URL or html file