Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private trackRequestStart(): void {
this.isRequesting = !!(++this.activeRequestCount);
if (this.isRequesting) {
const evt = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });
DOM.window.setTimeout(() => { DOM.dispatchEvent(evt); }, 1);
}
}
private trackRequestEnd(): void {
this.isRequesting = !!(--this.activeRequestCount);
if (!this.isRequesting) {
const evt = DOM.createCustomEvent('aurelia-fetch-client-requests-drained', { bubbles: true, cancelable: true });
DOM.window.setTimeout(() => { DOM.dispatchEvent(evt); }, 1);
}
}
trackRequestEnd() {
this.isRequesting = !!(--this.activeRequestCount);
if (!this.isRequesting) {
const evt = DOM.createCustomEvent('aurelia-fetch-client-requests-drained', { bubbles: true, cancelable: true });
DOM.window.setTimeout(() => { DOM.dispatchEvent(evt); }, 1);
}
}
processRequest(request, interceptors) {
trackRequestStart() {
this.isRequesting = !!(++this.activeRequestCount);
if (this.isRequesting) {
const evt = DOM.createCustomEvent('aurelia-fetch-client-request-started', { bubbles: true, cancelable: true });
DOM.window.setTimeout(() => { DOM.dispatchEvent(evt); }, 1);
}
}
trackRequestEnd() {