Execute specific JS when add-on has been loaded

I’m working on an add-on and I need to execute content/main.js when the add-on has been loaded. How I can do this?

main.js contains self-executable function (()=>{[content]})();

Ok, I find an example: elastic_tabstops.

Note, this repo is not quite finished yet, but you may like it:


Yeah thanks, I’ll keep an eye on this repo, looks interesting.