Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 3:54 PM, Glenn Maynard wrote: > On Wed, Dec 21, 2011 at 2:55 PM, Jarred Nicholls wrote: > >> On Wed, Dec 21, 2011 at 1:59 PM, Jarred Nicholls >>> wrote: >>> 1. Clean code, which is better for authors and the web platform. To achieve the same result

Re: [XHR2] timeout

2011-12-21 Thread Glenn Maynard
On Wed, Dec 21, 2011 at 2:55 PM, Jarred Nicholls wrote: > On Wed, Dec 21, 2011 at 1:59 PM, Jarred Nicholls >> wrote: >> >>> >>>1. Clean code, which is better for authors and the web platform. To >>>achieve the same results as a native dataTimeout, your snippet would need >>>to be

Re: [XHR2] timeout

2011-12-21 Thread Kang-Hao (Kenny) Lu
(11/12/21 23:47), Anne van Kesteren wrote: > On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls > wrote: >> 1. The spec says the timeout should fire after the specified number of >> milliseconds has elapsed since the start of the request. I presume >> this means literally that, with no bearing o

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 2:26 PM, Glenn Maynard wrote: > On Wed, Dec 21, 2011 at 2:25 PM, Jarred Nicholls wrote: > >> You sound really self-conflicted based on how you started your message >> vs. how you ended it. >> > > Please be less vague. > My apologies. See below. > What if a UA suspends

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 2:15 PM, Olli Pettay wrote: > On 12/21/2011 08:59 PM, Jarred Nicholls wrote: > >> On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay > > wrote: >> >>On 12/21/2011 05:59 PM, Jarred Nicholls wrote: >> >>On Wed, Dec 21, 2011 at 10:47 AM

Re: [XHR2] timeout

2011-12-21 Thread Glenn Maynard
On Wed, Dec 21, 2011 at 2:25 PM, Jarred Nicholls wrote: > You sound really self-conflicted based on how you started your message vs. > how you ended it. > Please be less vague. -- Glenn Maynard

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 2:20 PM, Glenn Maynard wrote: > On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay wrote: > >> xhr.onprogress = function() { >> this.timeout += 250; >> } >> > > What if a UA suspends scripts in background pages (eg. to save battery), > but allows XHR requests to continue? This

Re: [XHR2] timeout

2011-12-21 Thread Glenn Maynard
On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay wrote: > xhr.onprogress = function() { > this.timeout += 250; > } > What if a UA suspends scripts in background pages (eg. to save battery), but allows XHR requests to continue? This would time out as soon as that happened. This particular snippet s

Re: [XHR2] timeout

2011-12-21 Thread Olli Pettay
On 12/21/2011 08:59 PM, Jarred Nicholls wrote: On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay mailto:olli.pet...@helsinki.fi>> wrote: On 12/21/2011 05:59 PM, Jarred Nicholls wrote: On Wed, Dec 21, 2011 at 10:47 AM, Anne van Kesteren mailto:ann...@opera.com>

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay wrote: > On 12/21/2011 05:59 PM, Jarred Nicholls wrote: > >> On Wed, Dec 21, 2011 at 10:47 AM, Anne van Kesteren > > wrote: >> >>On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls >>mailto:jar...@webkit.org>> wrote: >>

Re: [XHR2] timeout

2011-12-21 Thread Olli Pettay
On 12/21/2011 05:59 PM, Jarred Nicholls wrote: On Wed, Dec 21, 2011 at 10:47 AM, Anne van Kesteren mailto:ann...@opera.com>> wrote: On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls mailto:jar...@webkit.org>> wrote: 1. The spec says the timeout should fire after the specified

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 10:47 AM, Anne van Kesteren wrote: > On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls > wrote: > >> 1. The spec says the timeout should fire after the specified number of >> >> milliseconds has elapsed since the start of the request. I presume this >> means literally t

Re: [XHR2] timeout

2011-12-21 Thread Anne van Kesteren
On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls wrote: 1. The spec says the timeout should fire after the specified number of milliseconds has elapsed since the start of the request. I presume this means literally that, with no bearing on whether or not data is coming over the wire?

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
Are any user agents other than IE8+ currently implementing or have implemented XHR2 timeout? https://bugs.webkit.org/show_bug.cgi?id=74802 I have a couple of things I wanted to question, which may or may not result in clarification in the spec. 1. The spec says the timeout should fire after

Re: [XHR2] timeout

2011-06-21 Thread Anne van Kesteren
On Tue, 15 Mar 2011 14:54:28 +0100, Olli Pettay wrote: I think timeout is a bit too limiting. Especially the step 2. "If the send() flag is true raise an INVALID_STATE_ERR exception and terminate these steps. " Setting timeout no longer throws and invoking open() no longer resets it. http:

Re: [XHR2] timeout

2011-03-15 Thread Olli Pettay
On 11/12/2009 05:24 PM, Anne van Kesteren wrote: On Wed, 11 Nov 2009 00:03:07 +0100, Jonas Sicking wrote: On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren wrote: Anyway, do you have opinions on the synchronous case? Do you agree we should use TIMEOUT_ERR there? What do the people from Micr

Re: [XHR2] timeout

2009-11-12 Thread Anne van Kesteren
On Wed, 11 Nov 2009 00:03:07 +0100, Jonas Sicking wrote: On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren wrote: Anyway, do you have opinions on the synchronous case? Do you agree we should use TIMEOUT_ERR there? What do the people from Microsoft think? That makes sense to me. I've no

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren wrote: > On Tue, 10 Nov 2009 18:41:32 +0100, Jonas Sicking wrote: >> >> On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren >> wrote: >>> >>> abort() has some legacy attached to it that I rather not copy. >> >> Such as? > > Actually, apart from

Re: [XHR2] timeout

2009-11-10 Thread Anne van Kesteren
On Tue, 10 Nov 2009 18:41:32 +0100, Jonas Sicking wrote: On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren wrote: abort() has some legacy attached to it that I rather not copy. Such as? Actually, apart from switching the state to 0 in the end there is nothing. (This does not happen for

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren wrote: >> I agree that firing readystatechange seems like the most consistent thing >> to do. >> >> I agree that firing timeout (and IMHO abort) on the XHRUpload object >> unless upload has already finished. >> >> In general, I think essentially b

Re: [XHR2] timeout

2009-11-10 Thread Anne van Kesteren
On Tue, 10 Nov 2009 18:23:04 +0100, Jonas Sicking wrote: Are all of these comments for synchronous XHR only? Only the TIMEOUT_ERR exception was for the synchronous case. I think the synchronous case it would be most consistent to not dispatch any events. This is however not what Internet E

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 5:22 PM, Anne van Kesteren wrote: > I was looking at defining the timeout feature. For consistency with "abort > error" and "network error" it would make sense to introduce a TIMEOUT_ERR > for synchronous requests, but Internet Explorer is probably not doing this > (at leas

[XHR2] timeout

2009-11-10 Thread Anne van Kesteren
I was looking at defining the timeout feature. For consistency with "abort error" and "network error" it would make sense to introduce a TIMEOUT_ERR for synchronous requests, but Internet Explorer is probably not doing this (at least not per documentation). For consistency with "abort error