What is the execution flow of the external hosted javascript files with respect to the window.onload invokation. Say we have below code in the external file:
(function() {
console.log('logging1...');
})();
var func1 = function() {
console.log('func1 invoked!');
};
func1();
Before the window.load gets fired,
1.) What is the execution flow or output of the above code?
2.) Is there a possibility for any code of the file getting executed after window.load?
3.) Parallel with window.load, can an external file code be executed.