Skip to content

Commit

Permalink
Allow doubles for ProgressEvent's loaded and total
Browse files Browse the repository at this point in the history
This allows specifications to use ProgressEvents while not necessarily giving away the exact number of bytes, while maintaining a granularity greater than just 1 part in 100. See discussion in webmachinelearning/writing-assistance-apis#15 for the concrete use case.
  • Loading branch information
domenic committed Jan 22, 2025
1 parent 150a3b8 commit 5b4e883
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xhr.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1753,14 +1753,14 @@ interface ProgressEvent : Event {
constructor(DOMString type, optional ProgressEventInit eventInitDict = {});

readonly attribute boolean lengthComputable;
readonly attribute unsigned long long loaded;
readonly attribute unsigned long long total;
readonly attribute double loaded;
readonly attribute double total;
};

dictionary ProgressEventInit : EventInit {
boolean lengthComputable = false;
unsigned long long loaded = 0;
unsigned long long total = 0;
double loaded = 0;
double total = 0;
};
</pre>

Expand Down

0 comments on commit 5b4e883

Please sign in to comment.