aboutsummaryrefslogtreecommitdiffstats
path: root/lib/caldav/request/abstract.js
diff options
context:
space:
mode:
authorgaye <gaye@mozilla.com>2013-04-16 15:50:24 -0700
committergaye <gaye@mozilla.com>2013-04-18 10:46:25 -0700
commit5e788a0315b937ebfaea47ee15103b093bd4edb3 (patch)
tree9024ea21340ac246de43d7c467a4886dcd5d8382 /lib/caldav/request/abstract.js
parentc439df4388cc4bb5c1777c4dbdc5b164d5192d7f (diff)
downloadjsCalDAV-5e788a0315b937ebfaea47ee15103b093bd4edb3.tar.gz
Add an abort routine to Caldav.Xhr
Diffstat (limited to 'lib/caldav/request/abstract.js')
-rw-r--r--lib/caldav/request/abstract.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/caldav/request/abstract.js b/lib/caldav/request/abstract.js
index 7116217..9edf6fd 100644
--- a/lib/caldav/request/abstract.js
+++ b/lib/caldav/request/abstract.js
@@ -54,6 +54,8 @@
* @param {Function} callback node style callback.
* Receives three arguments
* error, parsedData, xhr.
+ * @return {Caldav.Xhr} The xhr request so that the caller
+ * has a chance to abort the request.
*/
send: function(callback) {
var self = this;
@@ -75,6 +77,8 @@
callback(new Errors.CaldavHttpError(xhr.status));
}
});
+
+ return req;
}
};