meter measures something within a known range. progress reports how much of a task is done.
Every meter has min="0" max="100" low="30" high="70". That cuts the range into a low region (below 30), a middle region and a high region (above 70). optimum says which region is good; the browser colors the others as worse, and the region farthest from the optimum as worst.
optimum |
value 15 (low) | value 50 (middle) | value 90 (high) |
|---|---|---|---|
| 10: low is good (errors) | |||
| 50: middle is good (humidity) | |||
| 90: high is good (battery) |
The first bar has value="3" max="10". The second has no value at all, which makes it indeterminate: work is happening, amount unknown.
Start begins with an indeterminate bar (connecting), then sets value as the pretend work completes. Only this part needs script, because only script knows how far the work has got.