window.close()

This commit is contained in:
Thomas Forgione 2018-08-22 16:43:50 +02:00
parent 27157710b4
commit 1aad3e7c15
No known key found for this signature in database
GPG Key ID: 203DAEA747F48F41
1 changed files with 5 additions and 2 deletions

View File

@ -28,9 +28,12 @@ class Game {
if (this.mainScreen.after === AfterMenu.Start) {
this.changeScreen(this.scene);
} else if (this.mainScreen.after === AfterMenu.Exit) {
if (navigator.app !== undefined && typeof navigator.app.exitApp === 'function') {
navigator.app.exitApp();
if (typeof window.close === 'function') {
window.close();
}
// if (navigator.app !== undefined && typeof navigator.app.exitApp === 'function') {
// navigator.app.exitApp();
// }
}
}
}