v136 ยท javascript
Update ProgressEvent to use double type for 'loaded' and 'total'
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 `load
concepts
-
Progress double
ProgressEvent.loaded / total move to double. Supports transfers over 4GB without overflowing.
-
AI streaming progress
The other half of the change: fractional progress where
total = 1andloadedramps 0..1 — the Writing Assistance APIs use case that drove the type change. -
Overflow Stress Test
Synthesise events with loaded/total up to 2 PB. Watch the bar cross the pre-136 32-bit overflow line (4.29 GB) and keep going —
doublestays exact up to 2 53. -
Precision Calculator
Drag a slider to emit fractional
ProgressEventvalues (0.0โ1.0) for the AI streaming use case, build custom events with anyloaded/totalvalues, and see an overflow boundary table showing where the oldunsigned long longinteger type failed and wheredoublestays exact.
why it shipped
https://github.com/webmachinelearning/writing-assistance-apis/issues/15