Standards, standards and more standards...This time we bring you news from the W3C Web API Working Group. They have published their Working Draft of "Progress Events 1.0".
Progress Events are event types used to monitor the progress of an operation. If you develop applications using XMLHTTPRequest or Media Access Events, then you need to understand how the progress events are being defined.
Events Defined in the Specification
There are five events defined in the specification. These include:
- Must be dispatched first, only happens once and indicates the operation has begun
- Can happen zero or more times based on what's happening and after the loadstart event, but must happen before the error, abort or load events
- An error has occurred, only happens once
- The operation has been canceled, only happens once
- The operation has successfully completed
All user agents must implement these events. They cannot be canceled and they cannot bubble. No default action is defined for the events.
The potential sixth event
known as "stalled" is not included in this working draft.
You can read the entire IDL on the W3C site
, but here is a quick run down of what's there: Three Attributes
- specifies if the total size of the transfer is known
- the total number of bytes downloaded excluding headers and any overhead since the beginning of the transaction
- the total number of bytes transfered in the operation Two methods
- Initiates the value of a ProgressEvent object
- Initiates the value of a namespaced ProgressEvent object
These two methods are basically the same with one additional parameter in the namespaced ProgressEvent.
Referring to the Specification
Any specification, like the XMLHTTPRequest Specification
, must reference or directly include the specification for Progress Events.
You can also use Progress Events in Web Content as a way to let people know what is happening when an application performs some operation.
What does it all really mean? It means developers now have a standard way to identify how operations are progressing in an application. It also means that specifications like the XMLHTTPRequest specification are probably going to need to be updated to reflect these new standards, so be prepared to hear more on that.