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

Add resizable ArrayBuffer examples #2434

Merged
merged 2 commits into from
Mar 1, 2023

Conversation

chrisdavidmills
Copy link
Contributor

@chrisdavidmills chrisdavidmills commented Feb 13, 2023

Description

This PR adds interactive examples for the new features related to the Resizable ArrayBuffer and growable SharedArrayBuffer Stage 3 draft, which was implemented in Chrome 111+.

Note that this just includes the new features related to ArrayBuffer, not SharedArrayBuffer. I didn't add examples for those, as SAB is only available in cross-origin isolated browsing contexts. In the SAB pages that currently do have interactive examples (for example SharedArrayBuffer.slice()), the examples don't run successfully because of this, and I am concerned that it makes the pages look broken.

Motivation

Additional details

Related issues and pull requests

@wbamberg
Copy link
Contributor

SAB is only available in cross-origin isolated browsing contexts. In the SAB pages that currently do have interactive examples (for example SharedArrayBuffer.slice()), the examples don't run successfully because of this, and I am concerned that it makes the pages look broken.

You're right, we should remove the examples from these pages IMO.

@NiedziolkaMichal
Copy link
Member

@chrisdavidmills We are already taking a look into SharedArrayBuffer in issue #2105. I am pretty confident that we can make cross-origin isolation work fine, so those examples don't need to be removed.

@chrisdavidmills
Copy link
Contributor Author

Thanks for the heads-up @NiedziolkaMichal. I'll not call for the removal of what's already there, in that case.

@wbamberg does what I've added here for the ArrayBuffer pages look OK to merge?

Copy link
Contributor

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

We don't have explanatory comments in interactive examples, they're "show don't tell". Otherwise these look great.

@chrisdavidmills
Copy link
Contributor Author

@wbamberg ok, gotcha. I've removed the comments

Copy link
Contributor

@wbamberg wbamberg left a comment

Choose a reason for hiding this comment

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

👍 thank you Chris. It always feels weird asking people to remove helpful comments, and maybe it's a bad policy, but I think it matters to be consistent one way or the other.

@wbamberg wbamberg merged commit 56ec841 into mdn:main Mar 1, 2023
@github-actions
Copy link

github-actions bot commented Mar 1, 2023

Congratulations on your first merged pull request. 🎉 Thank you for your contribution! Did you know we have a project board with high-impact contribution opportunities? We look forward to your next contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants