Re: [b2g] Closing app programatically

2013-10-23 Thread Gabriele Svelto
window.close() worked for me, thanks for the responses! If you need some examples on how to use this you can have a look at the recently landed wappush app in Gaia. There we use window.close() on a number of paths to automatically dismiss the application with minimal user intervention (e.g.

Re: [b2g] Closing app programatically

2013-10-22 Thread Julien Wajsberg
Le 21/10/2013 21:21, Gareth Aye a écrit : And from within the app? you can do that in the app, yep. signature.asc Description: OpenPGP digital signature ___ dev-b2g mailing list dev-b2g@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-b2g

Re: [b2g] Closing app programatically

2013-10-22 Thread Elvis Pfützenreuter
window.close() worked for me, thanks for the responses! On Mon, Oct 21, 2013 at 5:08 PM, Gareth Aye gareth@gmail.com wrote: I don't think that there is a way to do this without special privileges. Have you thought about not making the user restart the app? On Mon, Oct 21, 2013 at 3:05

Re: [b2g] Closing app programatically

2013-10-21 Thread Gareth Aye
And from within the app? On Mon, Oct 21, 2013 at 3:20 PM, Gareth Aye gareth@gmail.com wrote: Can you do that in content mode? On Mon, Oct 21, 2013 at 3:07 PM, Vivien Nicolas vnico...@mozilla.comwrote: window.close() likely. On 21/10/2013 21:05, Elvis Pfutzenreuter wrote: Is there

Re: [b2g] Closing app programatically

2013-10-21 Thread James Lal
Yes- you can use window.close (internally this is how we close stuff from our integration tests and in the email app we do this in normal content mode) On Mon, Oct 21, 2013 at 12:21 PM, Gareth Aye gareth@gmail.com wrote: And from within the app? On Mon, Oct 21, 2013 at 3:20 PM, Gareth

Re: [b2g] Closing app programatically

2013-10-21 Thread Gareth Aye
So when I try this in the browser I get [16:07:03.512] Scripts may not close windows that were not opened by script. It seems like apps/pages should not be able to do this anyway (normatively speaking). On Mon, Oct 21, 2013 at 4:04 PM, James Lal ja...@lightsofapollo.com wrote: Yes- you can use

Re: [b2g] Closing app programatically

2013-10-21 Thread Gareth Aye
I guess apps are opened by script. Still I vote for this being a bug. On Mon, Oct 21, 2013 at 4:14 PM, Gareth Aye gareth@gmail.com wrote: So when I try this in the browser I get [16:07:03.512] Scripts may not close windows that were not opened by script. It seems like apps/pages should

Re: [b2g] Closing app programatically

2013-10-21 Thread James Lal
Did you actually try this in b2g-desktop or the phone? Our browser firefox extensions are incomplete at best. - james On Mon, Oct 21, 2013 at 1:14 PM, Gareth Aye gareth@gmail.com wrote: So when I try this in the browser I get [16:07:03.512] Scripts may not close windows that were not