Yeah, nightly gives me this:
TypeError: XPIScope.XPIProvider.bootstrapScopes is undefined
I tried messagemanager, but aside from the fact that I’m confused which message manager to use, most of them don’t even work.
I’ve tried calling addMessageListener and after that send/broadcastAsyncMessage right after it for these:
browser.messageManager;
Cc["@mozilla.org/globalmessagemanager;1"].getService(Ci.nsIMessageListenerManager);
(window)messageManager
Cc["@mozilla.org/parentprocessmessagemanager;1"].getService(Ci.nsIMessageBroadcaster);
Cc["@mozilla.org/childprocessmessagemanager;1"].getService(Ci.nsISyncMessageSender);
Only the last two received the message.
But when I try to call these any of the above from the other add-on, I’m unsure how to catch them from my add-on.
Currently I do this:
pageMod.PageMod({
include: "*",
contentScriptWhen: 'start',
contentScriptFile: self.data.url("pagemod.js"),
attachTo: ["existing", "top", "frame"],
onAttach: function (worker) {
var lowLevelTab = core.viewFor(worker.tab);
var browser = tabUtils.getBrowserForTab(lowLevelTab);
browser.messageManager.addMessageListener("searchdictcc@roughael:handleMouseGesture", function (message) {
console.log(message.data)
});
}
});
It doesn’t work for any of them.
I’ve tried registering with the CC message managers using require("chrome), but no success either.
I’ve tried using postMessage and Dom-Events as described here:
Which works for scripts running in the webpage I’m on, but for some reason not when I do it from the fire-gestures add-on.