Unable to 'properly' close target application.

I understand the existing logic for application.close() is more or less return to the main page and refresh the page unless you’ve specified a re-direct, but I’m attempting to exit the browser on close, and was wondering if there was a means of doing this successfully, short of forcing a System.exit(#) call.

I’m fairly sure there’s an answer out there somewhere, I’ve just had no luck thus far.

At present, I’ve attempted to:

1 ‘catch’ the window.close event by implementing a window.closeListener, but I’m proving unable to catch the event, let alone act upon it.
2 Use Javascript to attempt to close the window using getMainWindow().executeJavaScript(“window.close()”); as well as “window.close();” but neither produced any notable functionality.
3 System.exit(); which, while it works, also kills the machine’s tomcat6 session, which Is not acceptable for the project guidelines I’m working with.

Are there any ways to use Vaadin or Javascript to close the browser window, even if it were to require lowering security settings? The target browser is Google Chrome. The application will be the only window open in the browser.

Thanks for your help and assistance in advance!

Found a solution. For those with a similar problem, if you’re using Google Chrome,
this link might prove useful.

It turns out that ‘window.close’ isn’t supported by google chrome. The solution mentioned in the above thread has some dispute as to whether or not it works with FireFox, however.