UNPKG

mock-xmlhttprequest

Version:
27 lines (23 loc) 540 B
/** * mock-xmlhttprequest v8.4.1 * (c) 2025 Bertrand Guay-Paquet * @license MIT */ import XhrEvent from './XhrEvent.mjs'; /** * XMLHttpRequest ProgressEvent */ class XhrProgressEvent extends XhrEvent { /** * @param type Event type * @param loaded Loaded bytes * @param total Total bytes */ constructor(type, loaded = 0, total = 0) { super(type); this.loaded = loaded; this.total = total; this.lengthComputable = total > 0; } } export { XhrProgressEvent as default };