Re: [ProgressEvents]
Garrett Smith wrote: On Sun, Sep 7, 2008 at 8:47 AM, Erik Dahlström [EMAIL PROTECTED] wrote: Hello webapps wg, On behalf of the SVG WG I'd like to propose adding to the ProgressEvents spec[1] an event equivalent to the 'loadend' (previously known as 'SVGPostLoad') event currently defined in SVG Tiny 1.2 [2]. The 'loadend' event is dispatched by completion of a load, no matter if it was successful or not. In terms of the ProgressEvents spec the 'loadend' event would be dispatched following either of 'abort', 'load' or 'error', and there must be exactly one 'loadend' event dispatched. In the Event definitions table it would look like this: Name: loadend Description: The operation completed How often?: once When?: Must be dispatched last If the event were dispatched last, and there was a progress bar, plus an overlay, then the success handler would fire before the progress bar + overlay were hidden/removed. Please see also: http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0537.html I would be in support of adding such an event. And I agree with Garrett that it makes more sense to dispatch it before the load/abort/error event is dispatched. In fact, we could even make the default behavior of the loadend event be dispatching one of the above three, thus allowing them to be canceled by calling .preventDefault on the loadend event. Would be interested to hear Ollis feedback given that he recently implemented progress events for XHR in firefox. / Jonas
loadend event Re: [ProgressEvents]
On Mon, 08 Sep 2008 04:25:42 -0500, Jonas Sicking [EMAIL PROTECTED] wrote: Garrett Smith wrote: On Sun, Sep 7, 2008 at 8:47 AM, Erik Dahlström [EMAIL PROTECTED] wrote: Hello webapps wg, On behalf of the SVG WG I'd like to propose adding to the ProgressEvents spec[1] an event equivalent to the 'loadend' (previously known as 'SVGPostLoad') event currently defined in SVG Tiny 1.2 [2]. The 'loadend' event is dispatched by completion of a load, no matter if it was successful or not. In terms of the ProgressEvents spec the 'loadend' event would be dispatched following either of 'abort', 'load' or 'error', and there must be exactly one 'loadend' event dispatched. In the Event definitions table it would look like this: Name: loadend Description: The operation completed How often?: once When?: Must be dispatched last If the event were dispatched last, and there was a progress bar, plus an overlay, then the success handler would fire before the progress bar + overlay were hidden/removed. Please see also: http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0537.html I would be in support of adding such an event. And I agree with Garrett that it makes more sense to dispatch it before the load/abort/error event is dispatched. In fact, we could even make the default behavior of the loadend event be dispatching one of the above three, thus allowing them to be canceled by calling .preventDefault on the loadend event. Would be interested to hear Ollis feedback given that he recently implemented progress events for XHR in firefox. OK, I will put this into the draft (which I should post this week so we can try to publish it again. Cheers Chaals -- Charles McCathieNevile Opera Software, Standards Group je parle français -- hablo español -- jeg lærer norsk http://my.opera.com/chaals Try Opera 9.5: http://www.opera.com
[xmlhttprequest2] loadend / done / ...
On Mon, 08 Sep 2008 22:01:47 +0200, Olli Pettay [EMAIL PROTECTED] wrote: The new event should be added to XHR2 too. One thing to be clarified is that what should happen if loadend handler restarts XHR - should load/abort/error still fire? It would get very icky otherwise, no? That is, if load/abort/error are dispatched as the default action of loadend/done/..., of which I'm not sure it's a good idea. -- Anne van Kesteren http://annevankesteren.nl/ http://www.opera.com/
Re: [ProgressEvents]
On Mon, Sep 8, 2008 at 1:01 PM, Olli Pettay [EMAIL PROTECTED] wrote: Jonas Sicking wrote: Garrett Smith wrote: On Sun, Sep 7, 2008 at 8:47 AM, Erik Dahlström [EMAIL PROTECTED] wrote: Hello webapps wg, On behalf of the SVG WG I'd like to propose adding to the ProgressEvents spec[1] an event equivalent to the 'loadend' (previously known as 'SVGPostLoad') event currently defined in SVG Tiny 1.2 [2]. The 'loadend' event is dispatched by completion of a load, no matter if it was successful or not. In terms of the ProgressEvents spec the 'loadend' event would be dispatched following either of 'abort', 'load' or 'error', and there must be exactly one 'loadend' event dispatched. In the Event definitions table it would look like this: Name: loadend Description: The operation completed How often?: once When?: Must be dispatched last If the event were dispatched last, and there was a progress bar, plus an overlay, then the success handler would fire before the progress bar + overlay were hidden/removed. Please see also: http://lists.w3.org/Archives/Public/public-webapps/2008JulSep/0537.html I would be in support of adding such an event. And I agree with Garrett that it makes more sense to dispatch it before the load/abort/error event is dispatched. In fact, we could even make the default behavior of the loadend event be dispatching one of the above three, thus allowing them to be canceled by calling .preventDefault on the loadend event. Would be interested to hear Ollis feedback given that he recently implemented progress events for XHR in firefox. / Jonas Sounds good to me, though I don't have strong opinion whether load/abort/error should be the default behavior for loadend. Maybe it is better to not to add any default behaviors to PE. The new event should be added to XHR2 too. One thing to be clarified is that what should happen if loadend handler restarts XHR - should load/abort/error still fire? Are you asking: What if the loadend handler calls open() on the same connection in loadend? When loadend is called, the actual completion event (abort | fail | load ) has not fired. Calling open should cause the previous connection to end. Jonas suggested that the corresponding event (abort | fail | load) should then fire unless e.preventDefault() is called. Just curious: Why call open() again in loadend? I do not see a sequence of events for SVG: http://dev.w3.org/SVG/profiles/1.2T/publish/interact.html#EventsPostload However, I noticed this example:- function imageLoadStart (evt) { progressBar.setFloatTrait(width, 0); var loadingAnimation = document.getElementById('loadingAnimation'); loadingAnimation.beginElement(); } - attempts to reference progressBar without first declaring it. The example also makes use of an 'ev' namespace that I can't see being declared. http://dev.w3.org/SVG/profiles/1.2T/publish/svgudom.html#events__ProgressEvent_total A working example would be great. Garrett -Olli
Re: [ProgressEvents]
Hi Garrett. Garrett Smith: However, I noticed this example:- function imageLoadStart (evt) { progressBar.setFloatTrait(width, 0); var loadingAnimation = document.getElementById('loadingAnimation'); loadingAnimation.beginElement(); } - attempts to reference progressBar without first declaring it. The example also makes use of an 'ev' namespace that I can't see being declared. http://dev.w3.org/SVG/profiles/1.2T/publish/svgudom.html#events__ProgressEvent_total A working example would be great. Thanks, fixed the namespace declaration and made the example complete. http://dev.w3.org/cvsweb/SVG/profiles/1.2T/master/udom.idd.diff?r1=1.246r2=1.247 -- Cameron McCormack ≝ http://mcc.id.au/