blob: da1b87782a49a5e0b0720774a7ea617f4254ef1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
Components.utils.import("resource://gre/modules/Services.jsm");
var permChangedObs = {
observe: function(subject, topic, data) {
if (topic == 'perm-changed') {
var permission = subject.QueryInterface(Components.interfaces.nsIPermission);
var msg = { op: data, type: permission.type };
sendAsyncMessage('perm-changed', msg);
}
}
};
Services.obs.addObserver(permChangedObs, 'perm-changed', false);
|