Re: upload progress events

* Maciej Stachowiak wrote:
>In practice, it would look like this in code:
>
>xhr.addEventListener('progress', func, false);
>xhr.upload.addEventListener('progress', func, false);
>
>However, this becomes much more useful when you have a reusable  
>upload/download progress UI control:
>
>var downloadURI = new ProgressUI(xhr);
>var uploadUI = new ProgressUI(xhr.upload);
>
>With separate events, you would need either two controls, or a way to  
>put the control in a mode where it listens to either only upload or  
>only download events.
>
>This would require a change in XHR to adopt the Progress Events spec,  
>but would considerably simplify Progress Events. Thoughts?

I would like to see worked out how this would work exactly for XHR, for
example, if you have a web service that adds a digital signature to some
XML document and a script that uses the service for a 1 MB document, but
half way through the response the server cuts the connection, and which
specification has to contribute the necessary bits to make this well-de-
fined.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Thursday, 29 March 2007 22:47:30 UTC