[progress-events] loaded member misnamed?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[progress-events] loaded member misnamed?

Anne van Kesteren-2

Hi,

Yesterday someone contacted me on IRC about implementing  
XMLHttpRequest.upload from XMLHttpRequest Level 2. It turns out that the  
Progress Events specification is not generic enough for both uploading and  
downloading as we agreed it should be long ago.

The ProgressEvent.loaded member should probably be defined in a more  
abstract way and I would actually suggest to rename it to  
ProgressEvent.transferred so it's clear that it is about transferred data.

(I also still feel that total and lengthComputable should be named in a  
more consistent way, e.g. total and totalKnown.)

Kind regards,


--
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>

Reply | Threaded
Open this post in threaded view
|

Re: [progress-events] loaded member misnamed?

Olli Pettay



Anne van Kesteren wrote:
>
> Hi,
>
> Yesterday someone contacted me on IRC about implementing
> XMLHttpRequest.upload from XMLHttpRequest Level 2.

It was me :)
I'll go through XHR2 and PE tomorrow and give possibly more comments.

> It turns out that the
> Progress Events specification is not generic enough for both uploading
> and downloading as we agreed it should be long ago.
>
> The ProgressEvent.loaded member should probably be defined in a more
> abstract way and I would actually suggest to rename it to
> ProgressEvent.transferred so it's clear that it is about transferred data.

Thanks, Anne, for bringing up this issue here already.

-Olli

Reply | Threaded
Open this post in threaded view
|

Re: [progress-events] loaded member misnamed?

Charles McCathieNevile-2
In reply to this post by Anne van Kesteren-2

Reply-to set to webapps - note we are in a transition...

On Wed, 28 May 2008 13:01:13 +0200, Anne van Kesteren <[hidden email]>  
wrote:

> Hi,
>
> Yesterday someone contacted me on IRC about implementing  
> XMLHttpRequest.upload from XMLHttpRequest Level 2. It turns out that the  
> Progress Events specification is not generic enough for both uploading  
> and downloading as we agreed it should be long ago.
>
> The ProgressEvent.loaded member should probably be defined in a more  
> abstract way

Can you explain in more detail what should be changed? (Feel free to raise  
a new issue for this in the webapps tracker - otherwise I will when I  
understasnd a bit more clearly what the issue is about).

> and I would actually suggest to rename it to ProgressEvent.transferred  
> so it's clear that it is about transferred data.

Probably, but like many things we inherited a name and there are existing  
implementations using it, so it seemed sensible to keep the names stable.

This is issue 119 [1] in the webapi tracker

[1] http://www.w3.org/2006/webapi/track/issues/119

cheers

Chaals

--
Charles McCathieNevile  Opera Software, Standards Group
     je parle français -- hablo español -- jeg lærer norsk
http://my.opera.com/chaals   Try Opera 9.5: http://snapshot.opera.com