Thanks!
I tried it out, and it doesn’t always seem to work. I am testing it with this script:
var ev = require("sdk/system/events");
ev.on("quit-application-requested", function(eSubject, eTopic, eData) {
console.log(eSubject.type);
});
If I just close the browser without creating a new tab or accessing some page, I can see the output as:
console.log: logout-test: quit-application-requested
However, it fails pretty much always if I access some page, or open a new tab or window before hitting the close button. Even ctrl+q doesn’t seem to do anything differently.
If I open a new hidden frame in the background, will it close when I close the last browser window? Can I make use of that in any way? Perhaps by tracking when that hidden frame is about to be closed?
Thanks!