On Mon, Nov 10, 2008 at 9:10 PM, Garret Wilson <[EMAIL PROTECTED]>wrote:
> > Michael, > > Actually, while I was waiting I did a test---I can successfully cancel > an upload, but I get no ready state change after I manually abort. Right... in looking a our implementation it won't fire an readystatechanged event in the abort case, although it should depending on the state at the time the abort method is called... http://www.w3.org/TR/XMLHttpRequest/#abort 1. Abort the send() algorithm<http://www.w3.org/TR/XMLHttpRequest/#abort-send-algorithm>, set the response entity body<http://www.w3.org/TR/XMLHttpRequest/#response-entity-body> to "null", the error flag <http://www.w3.org/TR/XMLHttpRequest/#error-flag> to "true" and remove any registered request headers. 2. The user agent *should* cancel any network activity for which the object is responsible. 3. If the state is UNSENT<http://www.w3.org/TR/XMLHttpRequest/#unsent-state> , OPENED <http://www.w3.org/TR/XMLHttpRequest/#opened-state> and the send() flag <http://www.w3.org/TR/XMLHttpRequest/#send-flag> is "false", or DONE <http://www.w3.org/TR/XMLHttpRequest/#done-state> go to the next step. Otherwise, switch the state to DONE<http://www.w3.org/TR/XMLHttpRequest/#done-state>, set the send() flag <http://www.w3.org/TR/XMLHttpRequest/#send-flag> to "false" and synchronously dispatch a readystatechange<http://www.w3.org/TR/XMLHttpRequest/#readystatechange> event on the object. 4. Switch the state to UNSENT<http://www.w3.org/TR/XMLHttpRequest/#unsent-state>. (Do not dispatch the readystatechange<http://www.w3.org/TR/XMLHttpRequest/#readystatechange> event.) > > Garret > > On Nov 10, 8:56 pm, Michael Nordman <[EMAIL PROTECTED]> wrote: > > Hi Garret, > > The request object transitions to the 'complete' ready state (4) and the > > req.status property accessor will throw an exception after the request > has > > completed due to a network error or an explicit call to abort. > > > > On Mon, Nov 10, 2008 at 8:45 PM, Garret Wilson <[EMAIL PROTECTED] > >wrote: > > > > > > > > > Austin, > > > > > Thanks for the reply, but it was terribly vague. > > > > > "...thus carries the same fate..."---what fate is that? > > > > > "...in a particularly direct fashion."---what particular fashion is > > > it, then? > > > > > Perhaps the "fate" isn't "particularly direct", but surely *something* > > > happens. I need to know what that "something" is, because it isn't > > > documented. > > > > > * When a network error occurs, what does the readyState change to? > > > > > * When a network error occurs, is onprogress() called, and with what > > > values? > > > > > * When I cancel an upload, what does the readyState change to? > > > > > * When I cancel an upload, is onprogress() called, and with what > > > values? > > > > > Regardless of whether XHR is well documented, Gears is a Google > > > produce that presumably has some deterministic behavior in the > > > presence of errors. Why can't that be documented? > > > > > Garret >
