Skip to content

Commit ae950b7

Browse files
nreid260copybara-github
authored andcommitted
Add missing properties to W3C externs.
XMLHttpRequest status codes are defined on the constructor as well as the prototype. PiperOrigin-RevId: 321404826
1 parent 4bf54b2 commit ae950b7

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

externs/browser/w3c_xml.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,30 +412,60 @@ XMLHttpRequest.prototype.onerror;
412412
*/
413413
XMLHttpRequest.UNSENT;
414414

415+
/**
416+
* @const {number}
417+
* @see https://xhr.spec.whatwg.org/#states
418+
*/
419+
XMLHttpRequest.prototype.UNSENT;
420+
415421
/**
416422
* @const {number}
417423
* @see https://xhr.spec.whatwg.org/#states
418424
*/
419425
XMLHttpRequest.OPENED;
420426

427+
/**
428+
* @const {number}
429+
* @see https://xhr.spec.whatwg.org/#states
430+
*/
431+
XMLHttpRequest.prototype.OPENED;
432+
421433
/**
422434
* @const {number}
423435
* @see https://xhr.spec.whatwg.org/#states
424436
*/
425437
XMLHttpRequest.HEADERS_RECEIVED;
426438

439+
/**
440+
* @const {number}
441+
* @see https://xhr.spec.whatwg.org/#states
442+
*/
443+
XMLHttpRequest.prototype.HEADERS_RECEIVED;
444+
427445
/**
428446
* @const {number}
429447
* @see https://xhr.spec.whatwg.org/#states
430448
*/
431449
XMLHttpRequest.LOADING;
432450

451+
/**
452+
* @const {number}
453+
* @see https://xhr.spec.whatwg.org/#states
454+
*/
455+
XMLHttpRequest.prototype.LOADING;
456+
433457
/**
434458
* @const {number}
435459
* @see https://xhr.spec.whatwg.org/#states
436460
*/
437461
XMLHttpRequest.DONE;
438462

463+
/**
464+
* @const {number}
465+
* @see https://xhr.spec.whatwg.org/#states
466+
*/
467+
XMLHttpRequest.prototype.DONE;
468+
439469

440470
/**
441471
* @see https://xhr.spec.whatwg.org/#formdataentryvalue

src/com/google/javascript/jscomp/resources/resources.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)