[fix] should execute the binded function

This commit is contained in:
Joxit
2016-07-06 18:40:49 +02:00
parent 0c0846d406
commit ada12fd0f9

View File

@@ -35,7 +35,7 @@ Http.prototype.addEventListener = function(e, f) {
req.open(this.http._method, this.http._url);
req.send();
} else {
f.bind(this);
f.bind(this)();
}
});
break;
@@ -43,7 +43,7 @@ Http.prototype.addEventListener = function(e, f) {
default:
{
self.oReq.addEventListener(e, function() {
f.bind(this);
f.bind(this)();
});
break;
}