Closed asos-tomp closed 5 years ago
The sourcecode indicates that a fourth argument to loadJs is possible, as arg[3]:
loadJs
arg[3]
https://github.com/muicss/loadjs/blob/master/src/loadjs.js#L216
...however, I'm not sure this is correct, I believe the third argument would be ignored? I think arg[2] could have the comment:
arg[2]
* @param {Function|Object} [arg2] - The success or error callback or object literal with success/error arguments, numRetries, etc.
...or something more snappy!
Similarly, as per the example:
loadjs(['/path/to/foo.js', '/path/to/bar.js'], { success: function() { /* foo.js and bar.js loaded in series */ }, async: false });
...arg[1] can actually be an object literal, and not just {(string|Function)} as the comment suggests.
arg[1]
{(string|Function)}
Fixed! Thanks for the suggestion. https://github.com/muicss/loadjs/blob/master/src/loadjs.js#L211-L219
The sourcecode indicates that a fourth argument to
loadJs
is possible, asarg[3]
:https://github.com/muicss/loadjs/blob/master/src/loadjs.js#L216
...however, I'm not sure this is correct, I believe the third argument would be ignored? I think
arg[2]
could have the comment:...or something more snappy!
Similarly, as per the example:
...
arg[1]
can actually be an object literal, and not just{(string|Function)}
as the comment suggests.