How to exit a hosted application

I am developing an app which is remotely hosted.

But the TizenApi is not available when the app is hosted as per documentation.

so tizen.application.getCurrentApplication().exit(); is not a option.

Also the regular window.close() is disabled with a security warning.
How can I exit a hosted app.

Thank you