Added removeEventListener method, and empty event parameter to the event callback

This commit is contained in:
illiptic 2014-12-14 15:07:10 +01:00
parent 7b4c731fc9
commit bfa6571e7c

View File

@ -159,11 +159,19 @@ getJasmineRequireObj().AjaxFakeRequest = function() {
self = this;
this.events[event] = function() {
callback.apply(self);
callback.apply(self, [{}]);
existingCallback();
};
},
removeEventListener: function(event, callback) {
var existingCallback = this.events[event];
if(existingCallback){
delete this.events[event];
}
},
status: null,
send: function(data) {