Languages

Menu
Sites
Language
Remote Web Application Exit

Hi, 

I have a remote web applicaiton for tizen tv which is redirected from config.xml to remote url instead of index.html. Therefore I am unable to reach tizen object in the window to exit application by implementing tizen.application.getCurrentApplication().exit();

How can I exit from the remote web application by javascript.

Responses

3 Replies
Christof Meerwald

"window.close()" should work.

Actually it works on older tizen TV's but not on 2016+ Tizen TV's. The model I am working on is UE55KS8500.

Armaan-Ul- Islam

According to MDN:

[Window.close()] is only allowed to be called for windows that were opened by a script using the window.open() method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script. So in order to use this method, you have to use the window.open() method to be able to close it via window.close()

 

Try this code instead:

function closeApp(){
    
var appWin=window.open("","_self");
appWin.close();

}