RE: [FileAPI] Result of calling MultipleReads on FileReader

On Monday, April 18, 2011 12:04 PM, Jonas Sicking wrote:
> On Mon, Apr 18, 2011 at 9:02 AM, Adrian Bateman <adrianba@microsoft.com>
> wrote:
> > On Friday, April 15, 2011 2:41 PM, Jonas Sicking wrote:
> >> Yes. I.e. the semantics of readAsX is basically:
> >>
> >> readAsX(...) {
> >>   if (requestInProgress)
> >>     abort();
> >>
> >>   ... start new reading ...

> >> Calling the abort() fires the "abort" and "loadend" events before the
> >> function returns. Likewise readAsX fires the "loadstart" event before
> >> it returns. So if a load has already started, then readAsX fires,
> >> before it returns, the following events in order:
> >>
> >> "abort", "loadend", "loadstart"
> >>
> >> But indeed, the spec needs improvements here.
> >
> > Does loadstart fire synchronously or asynchronously (presuming the first
> two fire
> > synchronously?)?
> 
> All three fire synchronously. I.e. all three events fire before the
> readAsX function returns.

Currently the spec says "Queue a task to dispatch a progress event called
loadstart". Is that incorrect or just different when restarting a read?

Adrian.

Received on Monday, 18 April 2011 19:55:45 UTC