-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the adapter cancellation methods with a cancellation token sy…
…stem
- Loading branch information
1 parent
cbe88fa
commit 913888f
Showing
4 changed files
with
69 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default class XHRToken { | ||
get xhr() { | ||
return this._xhr; | ||
} | ||
|
||
capture(xhr) { | ||
this._xhr = xhr; | ||
} | ||
|
||
abort() { | ||
if (this.xhr) { | ||
this.xhr.abort(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.