У меня есть наблюдатель "quit-application",
TestApp.ns(function() {
with (TestApp.Lib) {
//Ci = Components.interfaces;
theApp.ExitObserver = function() {},
// Called on uninstall
theApp.ExitObserver.prototype.observe = function(subject, topic, data){
if (topic == "quit-application"){
alert(" exit ");
}
};
}
});
Im My Main.js file Я назвал этот ExitObserver как показано ниже.
theApp.exitObserver = new theApp.ExitObserver();
observerService.addObserver(theApp.exitObserver, "quit-application", false);
Когда пользователь выходит из браузера, мое оповещение не работает. Есть ли проблема в этой реализации?