Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
FakeXMLHttpRequest.prototype.abort = function() {
this.aborted = true;
this.responseText = null;
delete this.response;
this.errorFlag = true;
this.requestHeaders = {};
this.dispatchEvent(new _Event("abort", false, false, this));
if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {
this._readyStateChange(FakeXMLHttpRequest.UNSENT);
this.sendFlag = false;
}
if (typeof this.onerror === "function") {
this.onerror();
}
}
FakeXMLHttpRequest.prototype.abort = function() {
this.aborted = true;
this.responseText = null;
delete this.response;
this.errorFlag = true;
this.requestHeaders = {};
this.dispatchEvent(new _Event("abort", false, false, this));
if (this.readyState > FakeXMLHttpRequest.UNSENT && this.sendFlag) {
this._readyStateChange(FakeXMLHttpRequest.UNSENT);
this.sendFlag = false;
}
if (typeof this.onerror === "function") {
this.onerror();
}
}