Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update support for ArrayBufferView and URLSearchParams in XHR.send #12757

Merged
merged 3 commits into from Nov 1, 2021

Conversation

gilmoreorless
Copy link
Contributor

Summary

Filled in null values, and corrected some erroneous entries for https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/send

Test results and supporting details

  • ArrayBuffer and ArrayBufferView
    • IE: Support for ArrayBufferView was added in the same release as ArrayBuffer (10). I've previously written production code that relies on IE10 supporting UInt8Array in xhr.send().
    • Safari: I think there was a mismatch in the existing data, where the support data for ArrayBuffer was listed in the ArrayBufferView section. As far as I can tell from WebKit issues, ArrayBuffer support was added in the same release (6) as Blob and FormData support (bug 50199), while ArrayBufferView was added later in version 7 (bug 90536).
  • URLSearchParams
    • Most of these updates were to align with the support data of the URLSearchParams object itself. https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams
    • IE: Doesn't support URLSearchParams at all.
    • Opera: Was listed as version 12. But overall URLSearchParams object support is listed as being added in version 36, so it can't have supported URLSearchParams in xhr.send() in version 12. I've updated Opera and Opera Android to match their respective Chrome versions for this API.
    • Safari: Was listed as not supported, but I think that was a misunderstanding of the linked bug (227477). When URLSearchParams was added in Safari 10.1 (iOS 10.3), it was implicitly supported in xhr.send() via calling .toString() on the body argument. Bug 227477 corrected the Content-Type header, and was fixed and included in Safari Tech Preview 129 / Safari 15. I tested this manually by comparing results in Safari 14.1 and Safari 15.

@github-actions github-actions bot added the data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API label Oct 9, 2021
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a sensible clean up. A couple adjustments needed for the fixes in Safari 15. Thank you!

api/XMLHttpRequest.json Show resolved Hide resolved
api/XMLHttpRequest.json Show resolved Hide resolved
Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for digging into this! There's just one small change I'd like to request, but otherwise the IE data agrees with what I've found, and the Safari data looks good to me!

api/XMLHttpRequest.json Show resolved Hide resolved
Copy link
Collaborator

@queengooborg queengooborg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick adjustments, this is LGTM! 👍

@queengooborg queengooborg merged commit 490a723 into mdn:main Nov 1, 2021
@gilmoreorless gilmoreorless deleted the xhr-send branch November 1, 2021 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data:api 🐇 Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants