Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #51 from jakemac53/abort
Browse files Browse the repository at this point in the history
add abort to core-ajax
  • Loading branch information
garlicnation committed Dec 16, 2014
2 parents 7cbed4b + 7941b31 commit f69f7cb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions core-ajax.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,20 @@
}
}
return this.activeRequest;
},

/**
* Aborts the current active request if there is one and resets internal
* state appropriately.
*
* @method abort
*/
abort: function() {
if (!this.activeRequest) return;
this.activeRequest.abort();
this.activeRequest = null;
this.progress = {};
this.loading = false;
}

});
Expand Down

0 comments on commit f69f7cb

Please sign in to comment.