[progress-events] loaded member misnamed?

View: New views
3 Messages — Rating Filter:   Alert me  

[progress-events] loaded member misnamed?

by Anne van Kesteren-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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/>


Re: [progress-events] loaded member misnamed?

by Olli Pettay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message




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


Re: [progress-events] loaded member misnamed?

by Charles McCathieNevile-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

On Wed, 28 May 2008 13:01:13 +0200, Anne van Kesteren <annevk@...>  
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