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

feat: Improved compliance of Blob and Body #413

Conversation

nabetti1720
Copy link
Contributor

Description of changes

Add the following methods to improve the compliance of Blob and Body Object.

Checklist

  • Created unit tests in tests/unit and/or in Rust for my feature if needed
  • Ran make fix to format JS and apply Clippy auto fixes
  • Made sure my code didn't add any additional warnings: make check
  • Updated documentation if needed (API.md/README.md/Other)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@richarddavison
Copy link
Contributor

richarddavison commented Jun 9, 2024

Thanks for the PR, awesome work

Im very surprised these APIs still don't work in browsers yet:
await new Blob(["text"]).bytes()

@richarddavison richarddavison merged commit 50a2ff2 into awslabs:main Jun 9, 2024
5 checks passed
@nabetti1720
Copy link
Contributor Author

nabetti1720 commented Jun 9, 2024

Hi, @richarddavison.

Yes, Since it was recently incorporated into the File API, I believe it will be supported in the future.
w3c/FileAPI#198

In addition, other Javascript runtimes seem to be progressing in their support.

Bun already supports it.

% bun -e "console.log(await new Blob(['text']).bytes());"
Uint8Array(4) [ 116, 101, 120, 116 ]

Deno seems to be trying to support exactly that.
denoland/deno#24148

I would like to help improve compliance with WinterCG and other standards as much as I can. :)

@nabetti1720 nabetti1720 deleted the feat/improved-compliance-of-blob-and-body branch June 9, 2024 21:22
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.

2 participants