W3C home > Mailing lists > Public > public-webapi@w3.org > April 2006

Re: XMLHttpRequest progress events

From: Gorm Haug Eriksen <gormer@opera.com>
Date: Tue, 25 Apr 2006 11:22:05 +0200
To: "Bjoern Hoehrmann" <derhoermi@gmx.net>, "Jonas Sicking" <jonas@sicking.cc>
Cc: "Web APIs WG (public)" <public-webapi@w3.org>
Message-ID: <op.s8j4a3rom2jbu9@pt-osx.oslo.opera.com>

On Tue, 25 Apr 2006 10:59:48 +0200, Bjoern Hoehrmann <derhoermi@gmx.net>  

> * Jonas Sicking wrote:
>>>> In many cases the user might know the size even if the implementation
>>>> does not. Or it is even imaginable that the script knows the size even
>>>> if the XHR class does not. In both these cases the number of bytes
>>>> transferred is useful to present.
>>> Right, they have currentSize = knownSize * position/total for that, no?
>> I'm not following you here. What properties are you proposing to make
>> available?
> LSProgress gives you a percentage of how much data has been transferred;
> if you know the total size and the total size property on the LSProgress
> object match, you can calculate the number of bytes transferred so far,
> no matter the units used.

You would still need to know the unit if you wanted to show a text to the  
user. I don't think percentage catches all use-cases. The total will in  
some cases be unknown or wrong so in some cases it makes sense to only  
show the .position as formated text.


- Gorm
Received on Tuesday, 25 April 2006 09:22:20 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:21 UTC