mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #16357 from Snuffleupagus/network-rm-getXhr
Remove the unused `getXhr`-option in the `NetworkManager` constructor
This commit is contained in:
commit
13b168f1bb
1 changed files with 1 additions and 6 deletions
|
@ -47,11 +47,6 @@ class NetworkManager {
|
|||
this.isHttp = /^https?:/i.test(url);
|
||||
this.httpHeaders = (this.isHttp && args.httpHeaders) || Object.create(null);
|
||||
this.withCredentials = args.withCredentials || false;
|
||||
this.getXhr =
|
||||
args.getXhr ||
|
||||
function NetworkManager_getXhr() {
|
||||
return new XMLHttpRequest();
|
||||
};
|
||||
|
||||
this.currXhrId = 0;
|
||||
this.pendingRequests = Object.create(null);
|
||||
|
@ -73,7 +68,7 @@ class NetworkManager {
|
|||
}
|
||||
|
||||
request(args) {
|
||||
const xhr = this.getXhr();
|
||||
const xhr = new XMLHttpRequest();
|
||||
const xhrId = this.currXhrId++;
|
||||
const pendingRequest = (this.pendingRequests[xhrId] = { xhr });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue