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

Possible Inaccuracy in Documentation: Cross-Domain XHR Requests by Content Scripts #36438

Closed
DDDDD12138 opened this issue Oct 22, 2024 · 2 comments · Fixed by #36475
Closed
Assignees
Labels
Content:WebExt WebExtensions docs

Comments

@DDDDD12138
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Anatomy_of_a_WebExtension#content_scripts_2

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

In browser extensions, the statement that content scripts can make cross-domain XHR requests may be incorrect.

image

What did you expect to see?

The documentation might benefit from a clarification that content scripts are usually subject to the same-origin policy and cannot make cross-domain XHR requests without proper CORS configuration or by using background scripts.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

@DDDDD12138 DDDDD12138 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Oct 22, 2024
@github-actions github-actions bot added the Content:WebExt WebExtensions docs label Oct 22, 2024
@dotproto
Copy link
Collaborator

Thanks for calling this out. I suspect that this line was true when it was added and we didn't catch it when content scripts became subject to the injection context's CORS restrictions.

@rebloor rebloor removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Oct 24, 2024
@DDDDD12138
Copy link
Author

Do we need to update the documentation now? I think we can remove that sentence, as this is no different from ordinary scripts anymore.

Can I contribute to it?

@rebloor rebloor self-assigned this Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebExt WebExtensions docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants