Hello,
I would like to be notified each time there is an event in firefox
(for exemple, mouse moved, scrolling, etc). So, i have used this
function :
function myObserver()
{
this.register();
}
myObserver.prototype = {
observe: function(subject, topic, data) {
alert("there is an event..");
},
register: function() {
try{
var observerService =
Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.notifyObservers(this, "accessible-event", null);
}
catch(e)
{alert(e);}
},
unregister: function() {
var observerService =
Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.removeObserver(this, "accessible-event");
}
}
...
var observer = new myObserver();
observer.register();
the problem is that i never have the alert :-(
So maybe i shouldn't use "accessible-event" ??
Or is there another way to have user events?
_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom