Since you want, you can not do.
But you can do a little differently:
You need to perform some action at the end of the download. You can push it into the loadjs function as parameters. It will look something like this:
function loadjs(filename, callback, scope) { $.getScript("https://"+UMBRELLA.stat+"/v4/"+filename).done(function(data, textStatus, jqxhr){ if (callback != undefined){ if (scope != undefined) { callback.call(scope, true); } else { callback(true); } } }); }
And the calling function might look like this:
//... var f = function (isLoaded) { if (isLoaded === true) { // ваши дальнейшие действия после загрузки скрипта } }; loadjs("http://mysite/myfile.js", f, this); //...
Upon completion of the download, the function f will be called in the environment where it is located (this link, see the info about the "call").