I have my content.js and my foo.js. If I add foo.js to the content_scripts in the manifest I can call all functions from foo.js from within content.js. But I do not want that because I am afraid of collisions in variable names or function names.
I have thought about using the class identifier for all the code in foo.js, however, Chrome doesn't seem to be ES6-ready and complains about using import/export statements.
How do I wrap my functions in foo.js in a way that I can call them like foo.test() in my content.js? At the moment, test() is callable just like that globally which I want to avoid to keep my code and the environment clean