← Back to release summary

Update ProgressEvent to use double type for 'loaded' and 'total'

Category
JavaScript
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

Summary

The ProgressEvent has attributes `loaded` and `total` indicating the progress, and their type is `unsigned long long` now. With this feature, the type for these two attributes is changed to `double` instead, which gives the developer more control over the value. For example, the developers can now create a ProgressEvent with the `total` of 1 and the `loaded` increasing from 0 to 1 gradually. This is aligned with the default behavior of the <progress> HTML element if the max attribute is omitted.

Motivation

https://github.com/webmachinelearning/writing-assistance-apis/issues/15

Standards & signals

Explainers: https://github.com/whatwg/xhr/pull/394

View on chromestatus.com