open-nomad/ui/app/utils/classes/xhr-token.js

12 lines
145 B
JavaScript

export default class XHRToken {
capture(xhr) {
this._xhr = xhr;
}
abort() {
if (this._xhr) {
this._xhr.abort();
}
}
}