Re: [XHR] request error distinction: abort and error

On Fri, Aug 30, 2013 at 7:45 PM, Jonas Sicking <jonas@sicking.cc> wrote:
> Why? I agree that it can be hard to define order of externally visible
> effects, such as events, if there are any. However from a readability point
> of view indirection through state flags just makes the spec harder to read.
> So I don't see why removing such a pattern would be a goal in and of itself.

Because often such a function would do other things and then the order
of things is no longer deterministically defined. This is especially
true for these kind of asynchronous operations.

E.g. currently window.stop() invokes a "abort Document" operation
which cancels all fetch algorithms running for that Document, which
probably includes the fetch of XMLHttpRequest, although that is not
really well defined at the moment, and also would not cause abort to
happen (cancel just results in a network error).


-- 
http://annevankesteren.nl/

Received on Friday, 30 August 2013 18:55:51 UTC