I'm trying to convert my Chrome extension to a Firefox addon. The only issue I am having now is communicating between my webpage to the background script.
In Chrome, this is what I did:
background.js
chrome.runtime.onMessageExternal.addListener(function(request)
{
if (request.hello) { console.log('hello received'); }
});
webpage
chrome.runtime.sendMessage(ChromeExtId, {hello: 1});
I saw that onMessageExternal()
is not supported in Firefox yet, so I'm at a complete loss how to handle this situation now.
Any assistance would be greatly appreciated.