Is there a limit on number of content scripts I can run on a page?

Hi everybody

I am doing the last bug testing and optimization on a browser Extension before release and trying to do a shared codebase for both Chrome, Opera, Edge and Firefox.

So far everything is running well in all browsers besides Firefox.

I am struggleing to debug the issue, but found this post that could very well be related: “Order of execution of content scripts in Mozilla web extension” I have a hard time getting Firefox to run all the content scripts I need. In the manifest I have this:

“content_scripts”: [

{

"matches": ["<all_urls>", "http://*/*", "https://*/*"],

"all_frames": false,

"js": ["content.js", "purify.min.js", "gsap.min.js", "Draggable.min.js", "draggabilly.pkgd.js", "ispin_mod.js"],

"run_at" : "document_idle"

},

It seems like all 6 scripts aren’t excecuted like they should? I have tried changing the order of the scripts - but no luck! content.js is the script I have made, the 5 others are libraries I use for functionality.
If I put content.js last it isn’t executed at all? If I didn’t know better I would think that there is a limit on number of content scripts I can load in Firefox???

Any help with debugging, alternative solutions or anything similar is highly appreciated - I am a bit stuck (so close to the target).

So, I have tried debugging this further: I added: "console.log(‘XXX is now running’).
To all files to narrow down what was going on…

Google Chrome just runs all 6 files - no problem.

In Firefox it seems that the GSAP.min.js is blocking further reading of other files.
I have tried changing the order of the scripts to a lot of different combinations.
It starts reading the GSAP file, but no content script are loaded after GSAP no matter what place in the order the file is placed - in the list of files.

Any idea why this might be? GSAP is an animation library for those of you that do not know it (https://greensock.com/gsap/).

I get no errors in the console?