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

Commit

Permalink
add abort to core-ajax
Browse files Browse the repository at this point in the history
  • Loading branch information
jakemac53 committed Nov 19, 2014
1 parent 1f646f5 commit 7941b31
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 @@ -398,6 +398,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 7941b31

Please sign in to comment.