UNPKG

mock-xmlhttprequest

Version:
29 lines (24 loc) 555 B
/** * mock-xmlhttprequest v8.4.1 * (c) 2025 Bertrand Guay-Paquet * @license MIT */ 'use strict'; const XhrEvent = require('./XhrEvent.cjs'); /** * 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; } } module.exports = XhrProgressEvent;