Re: [whatwg/xhr] Wrong upload progress when network interrupts (Issue #361)

ShivamNimbalkar left a comment (whatwg/xhr#361)

You can check if you are online set a variable to false/true and if the network changes set it to true/false and add it to the condition for the progress bar animation.
we cannot change the behavior of the response of the api.

   @HostListener('window:offline', ['$event'])
  onoffline(event: any) {
    this.isOffline = true;
    console.log(event);
  }
  @HostListener('window:online', ['$event'])
  ononline(event: any) {
    this.isOffline = false;
    console.log(event);
  }  

you can use something like this if you are tying to animate the progress behavior.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/xhr/issues/361#issuecomment-2862018977
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/xhr/issues/361/2862018977@github.com>

Received on Thursday, 8 May 2025 07:13:11 UTC