Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function successCallback(data) {
  2.     dojo.publish("foo", [data]); //<-- any error happening in a subscriber
  3.                                  //    will also trigger errorCallback?
  4. }
  5.  
  6. function errorCallback(err) {
  7.     console.error("XHR error.. " + err);
  8. }
  9.  
  10. dojo.xhrGet({
  11.     url  : "/foobar",
  12.     load : successCallback,
  13.     error: errorCallback
  14. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement