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

SharedArray and Atomics examples don't work! #15169

Closed
kevmoo opened this issue Apr 20, 2022 · 9 comments
Closed

SharedArray and Atomics examples don't work! #15169

kevmoo opened this issue Apr 20, 2022 · 9 comments
Labels
Content:JS JavaScript docs

Comments

@kevmoo
Copy link

kevmoo commented Apr 20, 2022

MDN URL

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/and

What specific section or headline is this issue about?

Try it

What information was incorrect, unhelpful, or incomplete?

Example fails because SharedArrayBuffer is not available

What did you expect to see?

Demo should work!

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

No response

Do you have anything more you want to share?

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

https://developer.mozilla.org/en-US/docs/Web/API/crossOriginIsolated is false

Should either update the hosting story or delete the example 🤷

MDN metadata

Page report details
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Apr 20, 2022
@kevmoo kevmoo changed the title Seems like MDN needs to be served w/ the right SharedArray and Atomics examples don't work! Apr 20, 2022
@sideshowbarker sideshowbarker added Content:JS JavaScript docs help wanted If you know something about this topic, we would love your help! effort: medium This task is a medium effort. and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Apr 21, 2022
@jzombie
Copy link

jzombie commented Apr 23, 2022

@kevmoo Which browser and what version are you using?


Edit: Yeah, it doesn't work in Chrome either.

@kevmoo
Copy link
Author

kevmoo commented Apr 23, 2022

I'd suggest looking through all related examples – they are likely all broken.

@hamishwillee
Copy link
Collaborator

Yes, this requires the server to set:

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

I have raised mdn/interactive-examples#2105 to see if this can be done by the interactive examples.

In the meantime the SharedArrayBuffer docs need to be updated to better highlight this issue. Specifically, I THINK we should:

  1. Update the BCD with a subfeature for the security requirements to highlight the version. @queengooborg Would it make sense to do this as a subfeature of the constructor?
  2. Update the note in constructor header to make it less chrome specific and point to the limitation in the bcd
  3. In the top level doc not the restriction in the header.

@queengooborg
Copy link
Collaborator

If it's consistent across multiple browser engines, or is required by the spec, then yeah, I'd say a BCD subfeature is the way to go!

@Josh-Cena Josh-Cena removed help wanted If you know something about this topic, we would love your help! effort: medium This task is a medium effort. labels Jul 20, 2022
@Josh-Cena
Copy link
Member

This seems to be an issue anywhere but in content. Where should we track this? BCD? interactive-examples? Yari?

@hamishwillee
Copy link
Collaborator

This seems to be an issue anywhere but in content.

@Josh-Cena I don't understand what you mean by the above statement

I missed the response from @queengooborg . I believe we need to check the spec and see if this security requirement is defined. If not, work out where it comes from and go from there.

@Josh-Cena
Copy link
Member

Josh-Cena commented Sep 1, 2022

The requirement is defined. It's also present in our content. (See also #3489) The only problem here is that our interactive example infra does not serve it with the correct header, which seems more like an infrastructure issue than a content issue. If we want to track the documentation support for COOP and COEP (including both removal of the notion of "planned changes" and incorporation of BCD), we can do that in #3489.

@hamishwillee
Copy link
Collaborator

@Josh-Cena Thanks.

So yes, this specific bug is an infrastructure issue, which will be fixed (hopefully) by mdn/interactive-examples#2105

Yes, #3489 is a more logical place to track BCD and doc fixes.

@Josh-Cena
Copy link
Member

OK, let's track it separately in mdn/interactive-examples#2105 and #3489 instead.

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

No branches or pull requests

6 participants