I've several JS files; the first one is a library to be used by the next ones, and every one of those another files have a function main() which calls the functions of that file.
lib.js => library
a.js :: main() => call functions in a.js
b.js :: main() => call functions in b.js
...
...
So, I would want that were run the function main for those files (after of loading lib.js).
How do run each function main after of loading the JS file?
It would be load a.js and run main, load b.js and run main, ...