tenfourfox/testing/mochitest/tests/Harness_sanity/specialPowers_framescript.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

14 lines
428 B
JavaScript

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);