Skip to content

Commit 2c16af3

Browse files
refactor: remove useless xscheme attribute
The xscheme attribute was used when XDomainRequest was supported (IE8). Related: c656192
1 parent 5fc88a6 commit 2c16af3

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lib/transports/polling.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const hasXHR2 = (function () {
2626

2727
export class Polling extends Transport {
2828
private readonly xd: boolean;
29-
private readonly xs: boolean;
3029

3130
private polling: boolean = false;
3231
private pollXhr: any;
@@ -54,7 +53,6 @@ export class Polling extends Transport {
5453
(typeof location !== "undefined" &&
5554
opts.hostname !== location.hostname) ||
5655
port !== opts.port;
57-
this.xs = opts.secure !== isSSL;
5856
}
5957
/**
6058
* XHR supports binary
@@ -260,11 +258,7 @@ export class Polling extends Transport {
260258
* @private
261259
*/
262260
request(opts = {}) {
263-
Object.assign(
264-
opts,
265-
{ xd: this.xd, xs: this.xs, cookieJar: this.cookieJar },
266-
this.opts
267-
);
261+
Object.assign(opts, { xd: this.xd, cookieJar: this.cookieJar }, this.opts);
268262
return new Request(this.uri(), opts);
269263
}
270264

@@ -309,7 +303,7 @@ interface RequestReservedEvents {
309303
}
310304

311305
export class Request extends Emitter<{}, {}, RequestReservedEvents> {
312-
private readonly opts: { xd; xs; cookieJar: CookieJar } & SocketOptions;
306+
private readonly opts: { xd; cookieJar: CookieJar } & SocketOptions;
313307
private readonly method: string;
314308
private readonly uri: string;
315309
private readonly async: boolean;
@@ -360,7 +354,6 @@ export class Request extends Emitter<{}, {}, RequestReservedEvents> {
360354
"autoUnref"
361355
);
362356
opts.xdomain = !!this.opts.xd;
363-
opts.xscheme = !!this.opts.xs;
364357

365358
const xhr = (this.xhr = new XMLHttpRequest(opts));
366359

0 commit comments

Comments
 (0)