File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -510,11 +510,12 @@ exports.XMLHttpRequest = function() {
510510 * Called when an error is encountered to deal with it.
511511 */
512512 this . handleError = function ( error ) {
513- this . status = 503 ;
513+ this . status = 0 ;
514514 this . statusText = error ;
515515 this . responseText = error . stack ;
516516 errorFlag = true ;
517517 setState ( this . DONE ) ;
518+ this . dispatchEvent ( 'error' ) ;
518519 } ;
519520
520521 /**
@@ -527,6 +528,7 @@ exports.XMLHttpRequest = function() {
527528 }
528529
529530 headers = defaultHeaders ;
531+ this . status = 0 ;
530532 this . responseText = "" ;
531533 this . responseXML = "" ;
532534
@@ -539,6 +541,7 @@ exports.XMLHttpRequest = function() {
539541 setState ( this . DONE ) ;
540542 }
541543 this . readyState = this . UNSENT ;
544+ this . dispatchEvent ( 'abort' ) ;
542545 } ;
543546
544547 /**
You can’t perform that action at this time.
0 commit comments