()
| 265 | }); |
| 266 | // stops all XHR activity, aggressively |
| 267 | function clearRequests() { |
| 268 | tverb("stopping pending XHRs"); |
| 269 | if (xhr) { |
| 270 | for (let i = 0; i < xhr.length; i++) { |
| 271 | try { |
| 272 | xhr[i].onprogress = null; |
| 273 | xhr[i].onload = null; |
| 274 | xhr[i].onerror = null; |
| 275 | } catch (e) {} |
| 276 | try { |
| 277 | xhr[i].upload.onprogress = null; |
| 278 | xhr[i].upload.onload = null; |
| 279 | xhr[i].upload.onerror = null; |
| 280 | } catch (e) {} |
| 281 | try { |
| 282 | xhr[i].abort(); |
| 283 | } catch (e) {} |
| 284 | try { |
| 285 | delete xhr[i]; |
| 286 | } catch (e) {} |
| 287 | } |
| 288 | xhr = null; |
| 289 | } |
| 290 | } |
| 291 | // gets client's IP using url_getIp, then calls the done function |
| 292 | let ipCalled = false; // used to prevent multiple accidental calls to getIp |
| 293 | let ispInfo = ""; //used for telemetry |
no test coverage detected