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-12-21 Thread Anne van Kesteren
On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls jar...@webkit.org 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

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 10:47 AM, Anne van Kesteren ann...@opera.comwrote: On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls jar...@webkit.org 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

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 ann...@opera.com mailto:ann...@opera.com wrote: On Wed, 21 Dec 2011 16:25:33 +0100, Jarred Nicholls jar...@webkit.org mailto:jar...@webkit.org wrote: 1. The spec says the timeout

Re: [XHR2] timeout

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

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 olli.pet...@helsinki.fi 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 ann...@opera.com

Re: [XHR2] timeout

2011-12-21 Thread Glenn Maynard
On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay olli.pet...@helsinki.fiwrote: 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

Re: [XHR2] timeout

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

Re: [XHR2] timeout

2011-12-21 Thread Glenn Maynard
On Wed, Dec 21, 2011 at 2:25 PM, Jarred Nicholls jar...@webkit.org 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:15 PM, Olli Pettay olli.pet...@helsinki.fiwrote: On 12/21/2011 08:59 PM, Jarred Nicholls wrote: On Wed, Dec 21, 2011 at 1:34 PM, Olli Pettay olli.pet...@helsinki.fi mailto:Olli.Pettay@helsinki.**fi olli.pet...@helsinki.fi wrote: On 12/21/2011 05:59 PM, Jarred

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 jar...@webkit.org 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

Re: [XHR2] timeout

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

Re: [XHR2] timeout

2011-12-21 Thread Jarred Nicholls
On Wed, Dec 21, 2011 at 3:54 PM, Glenn Maynard gl...@zewt.org wrote: On Wed, Dec 21, 2011 at 2:55 PM, Jarred Nicholls jar...@webkit.orgwrote: On Wed, Dec 21, 2011 at 1:59 PM, Jarred Nicholls jar...@webkit.org wrote: 1. Clean code, which is better for authors and the web platform.

Re: [XHR2] timeout

2011-06-21 Thread Anne van Kesteren
On Tue, 15 Mar 2011 14:54:28 +0100, Olli Pettay olli.pet...@helsinki.fi 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

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 jo...@sicking.cc wrote: On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren ann...@opera.com wrote: Anyway, do you have opinions on the synchronous case? Do you agree we should use TIMEOUT_ERR

Re: [XHR2] timeout

2009-11-12 Thread Anne van Kesteren
On Wed, 11 Nov 2009 00:03:07 +0100, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren ann...@opera.com 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?

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 5:22 PM, Anne van Kesteren ann...@opera.com 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

Re: [XHR2] timeout

2009-11-10 Thread Anne van Kesteren
On Tue, 10 Nov 2009 18:23:04 +0100, Jonas Sicking jo...@sicking.cc 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

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren ann...@opera.com 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

Re: [XHR2] timeout

2009-11-10 Thread Anne van Kesteren
On Tue, 10 Nov 2009 18:41:32 +0100, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren ann...@opera.com 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

Re: [XHR2] timeout

2009-11-10 Thread Jonas Sicking
On Tue, Nov 10, 2009 at 10:17 AM, Anne van Kesteren ann...@opera.com wrote: On Tue, 10 Nov 2009 18:41:32 +0100, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 10, 2009 at 9:29 AM, Anne van Kesteren ann...@opera.com wrote: abort() has some legacy attached to it that I rather not copy.