aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJames Lal <james@lightsofapollo.com>2012-07-06 07:59:52 -0700
committerJames Lal <james@lightsofapollo.com>2012-07-06 07:59:52 -0700
commitf6fc6f10aaa20546a4388c3aa100b0763f07b266 (patch)
treeb27cd05182a00ef35d4c4b430fa2ed1414716260 /lib
parentb295e4d28e9ee519488d58e79a40d9ec583eaebb (diff)
downloadjsCalDAV-f6fc6f10aaa20546a4388c3aa100b0763f07b266.tar.gz
Revert "Revert "Hacks to get this working in browser""
This reverts commit b295e4d28e9ee519488d58e79a40d9ec583eaebb.
Diffstat (limited to 'lib')
-rw-r--r--lib/webcals/xhr.js10
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) {