Commit 77fd202
[PR] Fix static declarations for XMLHttpRequest
Summary:
Encountered this error while using static values from [XMLHttpRequest](https://xhr.spec.whatwg.org/#interface-xmlhttprequest):
```
Cannot get `XMLHttpRequest.DONE` because property `DONE` is missing in statics of `XMLHttpRequest`
```
I think they were never declared properly in the [bom.js](https://github.com/facebook/flow/blob/master/lib/bom.js#L584) file. Here's a [stripped down tryflow](https://flow.org/try/#0CYUwxgNghgTiAEkoGdnwMIFcZwHYBcANAWQBkAJffABwCUQBHTEZfedgbwCh32ARAPIA5AKIAueLkwBbAEYgYAbi49erKPgCWYZBO68DiOBpAAKAJQSsOEARIUqdRs1bKAkAcGiJUuQuUGAL5cwVygSHCI0KjwAAowAPbUCcggwABimgAe9pQ09EwsbJxcbupaYPBe4pIy8kqq-MI1vvXKjfDl2rrw+obsYMb4ZpZxicmpGdm5jgUu+AG8waFgCbis8MOsAIzwALwY2HhEZHlOhawAdNVcq+tsW-gATPtjSSlpmTmns85F180gA) demonstrating the issue as well as the fix.
On a related note, I'm not sure what the `create()` declaration in the `statics` block is for either.
Pull Request resolved: #6091
Reviewed By: dsainati1
Differential Revision: D13820105
Pulled By: nmote
fbshipit-source-id: 624042d694e2804473e75751bf75c61d9d21f65a1 parent 93409d9 commit 77fd202
3 files changed
+141
-142
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
582 | 587 | | |
583 | 588 | | |
584 | 589 | | |
| |||
616 | 621 | | |
617 | 622 | | |
618 | 623 | | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | 624 | | |
626 | 625 | | |
627 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
581 | | - | |
582 | | - | |
| 581 | + | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| |||
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
806 | | - | |
807 | | - | |
| 806 | + | |
| 807 | + | |
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
| |||
0 commit comments