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

Issue with "Cross-Origin Resource Sharing (CORS)": (short summary here please) #3062

Closed
johnye2e opened this issue Mar 12, 2021 · 1 comment · Fixed by #3138
Closed

Issue with "Cross-Origin Resource Sharing (CORS)": (short summary here please) #3062

johnye2e opened this issue Mar 12, 2021 · 1 comment · Fixed by #3138
Assignees
Labels
Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@johnye2e
Copy link

MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

What information was incorrect, unhelpful, or incomplete?

No event listeners are registered on any XMLHttpRequest.upload object used in the request; these are accessed using the XMLHttpRequest.upload property.

Specific section or headline?

https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests

What did you expect to see?

Perhaps:

No event listeners are registered on any XMLHttpRequest object used in the request; these are accessed using the XMLHttpRequest.upload property.

Did you test this? If so, how?

MDN Content page report details
@chrisdavidmills chrisdavidmills added Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Mar 12, 2021
@sideshowbarker sideshowbarker self-assigned this Mar 15, 2021
@sideshowbarker
Copy link
Collaborator

Thanks for reporting this. The object where the event listeners get registered is actually the XMLHttpRequestUpload object, and what’s sort of inherently confusing about this is that given an XMLHttpRequest instance xhr, accessing the xhr.upload property is how you get an XMLHttpRequestUpload object. But basically the only purpose of getting an XMLHttpRequestUpload object is to attach event listeners to it.

But you’re correct that “XMLHttpRequest.upload” isn’t strictly an object; instead, accessing the .upload property from an XMLHttpRequest instance returns an XMLHttpRequestUpload object — and then attaching event listeners to that XMLHttpRequestUpload object is what will trigger a preflight.

So in #3138 I’ve tried to revise the language to make it more clear what we’re talking about.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:HTTP HTTP docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants