The helper function _doScriptLoaded in define.js takes two arguments, but the second argument does not seem to be used while it is always passed every time the function is called.
The source code of the function body is below:
/**
* A callback function to call after a script is loaded
*
* @param {Node} _script The loaded script tag
* @param {Boolean} _isok Whether the script is successfully loaded or not
* @return {Void}
*/
var _doScriptLoaded = function (_script, _isok) {
var _uri = _doFormatURI(_script.src);
if (!_uri) return;
var _arr = __stack.pop();
if (!!_arr) {
_arr.unshift(_uri);
_doDefine.apply(p, _arr);
}
if (!!_uri && __scache[_uri] != 1) {
__scache[_uri] = 2;
}
_doClearScript(_script);
_doCheckLoading();
};
From this snippet we can see that the argument _isok is not used in any form in this function. Also, in the file define.js we can see there are several times when this function is called with two complete arguments.
E.g.
_doScriptLoaded(_script, !0);
or
_doScriptLoaded(_element, !0);
I find it really confusing. Is this a sort of intentional design with a specific purpose?
The helper function
_doScriptLoadedindefine.jstakes two arguments, but the second argument does not seem to be used while it is always passed every time the function is called.The source code of the function body is below:
From this snippet we can see that the argument
_isokis not used in any form in this function. Also, in the filedefine.jswe can see there are several times when this function is called with two complete arguments.E.g.
or
I find it really confusing. Is this a sort of intentional design with a specific purpose?