[Pkg-javascript-commits] [sockjs-client] 304/434: Drop automatical detection of xdr - createXHR exists no more.

Tonnerre Lombard tonnerre-guest at moszumanska.debian.org
Wed Jan 8 00:47:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch master
in repository sockjs-client.

commit 8d4b4ca94e389c57ed443f532a56a168c6c6e38c
Author: Marek Majkowski <majek04 at gmail.com>
Date:   Fri Jan 13 15:58:43 2012 +0000

    Drop automatical detection of xdr - createXHR exists no more.
---
 lib/dom2.js | 8 --------
 lib/info.js | 3 ++-
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/lib/dom2.js b/lib/dom2.js
index 996308f..b944715 100644
--- a/lib/dom2.js
+++ b/lib/dom2.js
@@ -136,11 +136,3 @@ XDRObject.prototype.close = function() {
     that.nuke();
     that._cleanup(true);
 };
-
-utils.createXHR = function(cors, method, url, payload) {
-    var XHRConstructor = XHRObject;
-    if (cors) {
-        XHRConstructor = _window.XDomainRequest ? XDRObject : XHRObject;
-    }
-    return new XHRConstructor(method, url, payload);
-};
diff --git a/lib/info.js b/lib/info.js
index 6ace492..418bfec 100644
--- a/lib/info.js
+++ b/lib/info.js
@@ -9,7 +9,8 @@ InfoReceiver.prototype = new EventEmitter(['finish']);
 
 InfoReceiver.prototype.doXhr = function() {
     var that = this;
-    var xo = utils.createXHR(true, 'GET', that.base_url + '/info' , null);
+    var AjaxObject = _window.XDomainRequest ? utils.XDRObject : utils.XHRObject;
+    var xo = new AjaxObject('GET', that.base_url + '/info' , null);
     xo.onfinish = function(status, text) {
         if (status === 200) {
             var rtt = (new Date()).getTime() - that.t0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list