Prevent undefined error
This commit is contained in:
parent
56bad3f84d
commit
da23d4dd39
|
|
@ -50,14 +50,25 @@ var tarteaucitron = {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
XMLHttpRequest.prototype.open = function () {
|
if (typeof XMLHttpRequest !== 'undefined') {
|
||||||
this.addEventListener('load', function () {
|
XMLHttpRequest.prototype.open = function () {
|
||||||
if (typeof tarteaucitronProLoadServices === 'function') {
|
|
||||||
tarteaucitronProLoadServices();
|
if (window.addEventListener) {
|
||||||
|
this.addEventListener("load", function () {
|
||||||
|
if (typeof tarteaucitronProLoadServices === 'function') {
|
||||||
|
tarteaucitronProLoadServices();
|
||||||
|
}
|
||||||
|
}, false);
|
||||||
|
} else {
|
||||||
|
this.attachEvent("onload", function () {
|
||||||
|
if (typeof tarteaucitronProLoadServices === 'function') {
|
||||||
|
tarteaucitronProLoadServices();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
origOpen.apply(this, arguments);
|
||||||
origOpen.apply(this, arguments);
|
};
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"load": function (params) {
|
"load": function (params) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue