diff options
author | James Lal <james@lightsofapollo.com> | 2012-06-28 13:44:41 +0200 |
---|---|---|
committer | James Lal <james@lightsofapollo.com> | 2012-06-28 13:44:41 +0200 |
commit | 23ba81022628d75f881a9285e4ca8fc0c394abfe (patch) | |
tree | 6a2d9559b6170ba410bb5db4c171c4c004bd816d /lib/webcals | |
parent | 51c84cac962d09fedbfd9481f6dc66120e12c46b (diff) | |
download | jsCalDAV-23ba81022628d75f881a9285e4ca8fc0c394abfe.tar.gz |
Hacks to get this working in browser
Diffstat (limited to 'lib/webcals')
-rw-r--r-- | lib/webcals/xhr.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/webcals/xhr.js b/lib/webcals/xhr.js index a8d8d58..fb925f0 100644 --- a/lib/webcals/xhr.js +++ b/lib/webcals/xhr.js @@ -52,7 +52,7 @@ url: null, headers: {}, - data: {}, + data: null, _seralize: function _seralize() { return this.data; @@ -80,7 +80,12 @@ } xhr = this.xhr = new this.xhrClass(); - xhr.open(this.method, this.url, this.async, this.user, this.password); + + if (Xhr.authHack) { + xhr.open(this.method, this.url, this.async); + } else { + xhr.open(this.method, this.url, this.async, this.user, this.password); + } for (header in this.headers) { if (this.headers.hasOwnProperty(header)) { @@ -88,6 +93,7 @@ } } + xhr.onreadystatechange = function onReadyStateChange() { var data; if (xhr.readyState === 4) { |