I use a browser_action with a default pop-up. In addition I’d like to ‘fire-up’ a background script right in the beginning (registering a browser.runtime.onMessage.addListener(handleMessage)).
The idea is that the po-up ask for a password or starts a password request if non is set yet. Then, the password is send to the background script which manages the main activities of the extension.
The pop-up opens fine; however, I can not get the background script to be executed.
I have an entry in the manifest as follows:
This alone does not seem to automatically execute the script. (I have put an alert in there to recognize execution).
-> what else (in addition to the manifest entry) do I need to do in order to get the background script get executed automatically such that it can register an onMessage event the pop-up can send to?
I could not find a comparable example in the examples list (please point me there if you know of one).