Latest Nightlies are no longer capable of communication between add-on script and content-script before the page readystate is complete.
There’s also no one confirming wether or not this change has been intentional and if it will stay like this, or if it is a bug that needs to be corrected.
As such (and seeing how mozilla has been making lots of terrible decisions lately) I am assuming that this is here to stay and I am trying to find an alternate method of passing information when the content-script is attached, but I can’t find anything that works other than completely dropping the pageMod api and use a different method of attaching content-scripts to pages to avoid the issue completely, which as far as I could find it is extremely more complicated than pageMod.
I already tried the self.port, self.port.on and worker.postMessage apis, all only work too late.
I also tried contentScriptOptions, which works except they are static (don’t understand why this has been made static intentionally since it would make the pageMod api a far easier api to work with if it was dynamic). Any change to the settings will never have any effect unless the pageMod is destroyed, page is reloaded (including all affected tabs) and then attach the pageMod with the updated static options, or restart the browser entirely. This is not a working solution.
Are there any other ways of communicating with the content script before the pages’ readystate is complete?