Despite its compact API, the progressbar widget makes a great addition to the library, providing essential visitor feedback when processes are in progress. The component is useful in any situation where the percentage complete of the process can reliably be updated by the system.
After looking at the default implementation we moved on to take a look at the value
option and how it can be used; we can set the value
prior to initialization using a configuration object, and we can set it after initialisation using the option
method.
Next we looked at the change
event, which is fired by the widget whenever its value
is changed. Using the standard way of hooking into the event with an anonymous callback function within our configuration object we can easily react to the amount of progress changing.
We saw that in addition to the standard API methods such as destroy
, the widget also exposes the value
method, which can be used as a shortcut to setting the value using the option
method.
Although...