(e)
| 110 | } |
| 111 | |
| 112 | function progress(e) { |
| 113 | const { loaded, total } = e; |
| 114 | const percent = Math.round((loaded / total) * 100); |
| 115 | xhr.percent = percent; |
| 116 | |
| 117 | if (typeof onprogress === "function") { |
| 118 | onprogress(loaded, total); |
| 119 | } |
| 120 | |
| 121 | if (typeof ajax.onprogress === "function") { |
| 122 | const progresses = []; |
| 123 | xhrs = xhrs.filter((xhr) => { |
| 124 | if (xhr.status !== 200 || xhr.percent === 100) return false; |
| 125 | progresses.push(xhr.percent); |
| 126 | return true; |
| 127 | }); |
| 128 | |
| 129 | ajax.onprogress(Math.min(...progresses, 100)); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | function handleError() { |
| 134 | let res = xhr; |
nothing calls this directly
no outgoing calls
no test coverage detected