4 ms·
I'd been using $script for quite a while until I noticed that it was executing callbacks even when the dependency didn't load. After looking at the source code,
by andres 11y ago
I'd been using $script for quite a while until I noticed that it was executing callbacks even when the dependency didn't load. After looking at the source code, I realized that it's because it was designed to work with legacy browsers that don't have onerror callbacks. Since I'm only focused on modern browsers and $script isn't maintained anymore, I wrote LoadJS to add success/fail callback support.