From 63d40941ff5c0bc8a98596005b39df3f26077206 Mon Sep 17 00:00:00 2001 From: Arnout Kazemier Date: Mon, 20 Jun 2011 21:13:01 +0200 Subject: [PATCH] XHR now has a close method --- lib/transports/xhr.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/transports/xhr.js b/lib/transports/xhr.js index 75c55d36..3a1002ed 100644 --- a/lib/transports/xhr.js +++ b/lib/transports/xhr.js @@ -130,6 +130,18 @@ this.sendXHR.send(data); }; + + /** + * Disconnects the established `XHR` connection. + * + * @returns {Transport} + * @api public + */ + + XHR.prototype.close = function () { + this.onClose(); + return this; + }; /** * Handle the disconnect request.