Closed W1zzardTPU closed 6 years ago
@W1zzardTPU Thanks for the PR. I think it will be useful to pass a callback function as an argument. Here are a couple of questions:
loadjs()
also accept a callback function as an argument?1) For simplicity I was thinking just execute on success, do nothing on error. If more control is needed, pass an array as currently supported. 2) I have no use for that functionality, but I can see how it could benefit other scenarios and it would make the API more uniform
Thanks for the clarification. Here are some modifications for your consideration: https://github.com/W1zzardTPU/loadjs/pull/1
Instead of
loadjs.ready(['foo', 'bar'], { success: function() { } });
this can be used
loadjs.ready(['foo', 'bar'], function() { });