Skip to content

Instantly share code, notes, and snippets.

@airportyh
Created April 11, 2013 19:49
Show Gist options
  • Select an option

  • Save airportyh/5366609 to your computer and use it in GitHub Desktop.

Select an option

Save airportyh/5366609 to your computer and use it in GitHub Desktop.
How to intercept dojo's xhr method.
var oldxhr = dojo.xhr;
dojo.xhr = function(){
var args = Array.prototype.slice.call(arguments)
return oldxhr.apply(dojo, arguments).addCallback(function(error){
console.log('Ajax finished: ', args)
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment