Skip to content

Commit

Permalink
Add a little logging when scripts load or fail to load
Browse files Browse the repository at this point in the history
  • Loading branch information
gashcrumb committed Sep 25, 2013
1 parent 2f4352b commit cdf20a2
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -106,7 +106,14 @@
var scriptName = data.Context + "/" + script;
console.log("Fetching script: ", scriptName);
$.ajaxSetup({async:false});
$.getScript(scriptName).always(scriptLoaded);
$.getScript(scriptName)
.done(function(textStatus) {
console.log("Loaded script: ", scriptName);
})
.fail(function(jqxhr, settings, exception) {
console.log("Failed loading script: ", exception);
})
.always(scriptLoaded);
});
});
} else {
Expand Down

0 comments on commit cdf20a2

Please sign in to comment.