Re: Progress event spec

On Mon, 29 Jan 2007 09:41:06 -0500, Jean-Claude Dufourd <jean-claude.dufourd@streamezzo.com> 
wrote:

> Charles McCathieNevile wrote:
>> 1. Make the "total" attribute 0 if the length is unknown, and drop the
>> boolean "lengthComputable".
>>
>> The rationale is that if you really have a zero-length load, it is
>> unlikely to
>> ever have time to fire a progress event, and will almost certainly
>> only fire any
>> in a really degenerate case. Having a large number was a bad idea,
>> since one day
>> you will have a large number of bytes, and having anegative number
>> meant having
>> a signed instead of unsigned integer.
> I think Maciej has a point. This feels like a hack.

It is - hencethe request for feedback.

>> 2. Remove the preload and postload events.
>>
>> You know when it finished, because the load event or whatever is
>> spitting out
>> progress will have finished. You know when it started, because you got a
>> progress event.
> The above text is meaningless: loadprogress being optional, you need a
> "load-is-beginning" and "load-is-complete" event that are mandatory. So
> what are you doing ? Removing the mandatory first and last event, or
> having them all called the same ?
>
> The use case for indeterminate length and you want to have the end event
> is: you get a live recording. And I would want to know if it is the end
> or just progress. So I really think that removing postload, or at least
> the clear indication of an end, is a mistake.

progress events are fired because you already have some other operation in 
progress, which will start and finish. For something like an HTTP connection 
where you take a couple of seconds to establish the connection it would be 
useful to fire a progress event with zero bytes loaded.

In the case of doing this for a connection where you don't know the length, this 
will be indistinguishable from a (now presumably completed) zero-length transfer. 
But since the transfer has presumably finished, what kind of UA would actually 
fire such a pointless event? It already *must* fire the load event, which you 
can trap to note that your loading is finished.

So the assumption behind the above combination is that it is a justifiable hack. 
I certainly haven't seen any use case for the zero-length transfer to fire a 
progress event - if there is one, then of course this hack is not good enough.

> The SVG working group is working on Media Access Events. Did you think
> of reading that spec and checking if there are interactions ? Would it
> be meaningful to merge the two ?

I might have a more interesting opinion after having *actually* read it instead 
of just thinking about it :)

cheers

Chaals

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

Received on Monday, 29 January 2007 15:58:21 UTC