Skip to content

Home > sculp-js > DownloadProgress

DownloadProgress interface ​

下载响应体的接收进度,仅由 XHR 提供。

Signature:

typescript
export interface DownloadProgress

Properties ​

Property

Modifiers

Type

Description

done

boolean

响应体成功接收完成,不表示文件已保存到磁盘。

lengthComputable

boolean

浏览器是否提供了有效的总字节数。

loaded

number

已接收字节数,使用浏览器原生传输统计口径。

percent?

number

(Optional) 0~100 的百分比;无法计算时为 undefined。

total?

number

(Optional) 总字节数;无法计算时为 undefined。

Released under the MIT License.