Hi, you can try to add an event handler each time a tab is closed and counting the number of open tabs. When this counter goes lower than 2 than the Chrome is going to be shut down.
I hope it helps! Luca On 15 Dic, 02:43, Tiby312 <kenakior...@gmail.com> wrote: > I gave it a shot and the code seems to run if I close the extension by > pressing the disable button of the extension in the extensions page, > but the code doesn't run if I just close the browser. :( > > On Dec 14, 6:23 pm, Marcos Aruj <marcos.a...@gmail.com> wrote: > > > > > What you can try is the adding a listener to the uninit event of the > > background script, but I haven't tried it. But may work. > > ;) > > > On Sun, Dec 13, 2009 at 5:22 PM, Tiby312 <kenakior...@gmail.com> wrote: > > > Is there an event listener for when chrome is closed? I tried using > > > the window close event, but it doesn't work for when you close the > > > last window. So how would one get some code to execute at that moment? > > > > -- > > > > You received this message because you are subscribed to the Google Groups > > > "Chromium-extensions" group. > > > To post to this group, send email to chromium-extensi...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > chromium-extensions+unsubscr...@googlegroups.com<chromium-extensions%2Bunsu > > > bscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/chromium-extensions?hl=en. > > > -- > > Marcos Aruj Alvarez > > Ingeniero de Software > > ------------------------------- > > marcos.a...@gmail.com > > ----- -- You received this message because you are subscribed to the Google Groups "Chromium-extensions" group. To post to this group, send email to chromium-extensi...@googlegroups.com. To unsubscribe from this group, send email to chromium-extensions+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/chromium-extensions?hl=en.