The only thing I know which is similar to restart is:
|window.location.reload();| or |window.location.href=“index.html”;|,
I cannot figure out the another way, if there is, please tell me :)

|window.close();| will remove the app from current running app list,
it’s somewhat different to what happens when you press home button.

-Alive

BTW, Vivien, it looks like we will have trouble if the app change its URL to 
the same page as the root page in the other page in the in-app-sheet model :) 
Two index.html at the same time!

Hugh Tay <[email protected]> 於 2014/2/13 下午9:48 寫道:

> Hello! 
> 
> 
> The code to do that, I meant. When you tap the Home button, the app 
> minimizes, and when you tap the app's icon again, it opens up with its 
> previous state preserved. But when you hold the Home button and X the app, 
> re-opening the app resets its state. 
> 
> So my question is, how do we (A) close the app programmatically (with code & 
> not holding the Home button) and, (B) refresh the app (clear it from memory 
> and reload its start page as listed in the manifest)? 
> 
> Thanks! 
> 
> 
> Hugh 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to