[whatwg] Progress Events "done" event

Andrew Fedoniouk news at terrainformatica.com
Sun Aug 26 10:59:32 PDT 2007

----- Original Message ----- 
From: "Garrett Smith" <dhtmlkitchen at gmail.com>
To: <whatwg at whatwg.org>
Cc: <chaals at opera.com>
Sent: Saturday, August 25, 2007 11:24 PM
Subject: [whatwg] Progress Events "done" event

> I've noticed a case when developing Ajax apps that I often end up
> duplicating a call to hide "loading.gif" (for example) when the call
> is over.
> Progress Events
> http://dev.w3.org/cvsweb/~checkout~/2006/webapi/progress/Progress.html?rev=1.16&content-type=text/html;%20charset=iso-8859-1#XHR

Just as an example of other way of doing this:

In HTMLayout and Sciter (h-smile core)  I introduced
:busy state flag in CSS. And DOM element as a class
have request() method [1] that allows to replace content
of the element from remote source or to deliver any
data (e.g. JSON, XML) to the element.

:busy CSS flag is active when some load data request
issued  for the element and until it finishes. So to style
in-progress situation is a matter of single
declaration in CSS:

td.bound:busy { background-image:url(progress.gif); }
iframe:busy { foreground-image:url(loading.gif); }
img:busy { foreground-image:url(loading-image.gif); }

Reason of my comment: I think that events
like this should be reflected in CSS state flags too.
CSS is a natural place to deal with this.

Andrew Fedoniouk.

[1] http://www.terrainformatica.com/sciter/Element.whtm

More information about the whatwg mailing list