Open amorey opened 6 years ago
Hi Everyone,
I just wanted to let you know that the latest version of LoadJS (3.5.2) accepts a success function as a simple callback argument:
loadjs(['/path/to/foo.js', '/path/to/bar.js'], function() { // foo.js & bar.js have loaded });
For access to more advanced features you can still pass in an object as an argument:
loadjs(['/path/to/foo.js', '/path/to/bar.js'], { success: function() { /* foo.js & bar.js have loaded */ }, error: function(pathsNotFound) { /* at least one path didn't load */ }, async: false });
I hope that helps to simplify your LoadJS syntax! Please let me know if you have any questions or suggestions.
Andres
P.S. Special thanks to @W1zzardTPU for the suggestion and the PR!
Hi Everyone,
I just wanted to let you know that the latest version of LoadJS (3.5.2) accepts a success function as a simple callback argument:
For access to more advanced features you can still pass in an object as an argument:
I hope that helps to simplify your LoadJS syntax! Please let me know if you have any questions or suggestions.
Andres
P.S. Special thanks to @W1zzardTPU for the suggestion and the PR!