Skip to content

Add [AllowImmutable] extended attribute for immutable array buffers and views #1487

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

Open
anba opened this issue May 16, 2025 · 1 comment
Open
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest

Comments

@anba
Copy link

anba commented May 16, 2025

What problem are you trying to solve?

https://github.com/tc39/proposal-immutable-arraybuffer will likely need a new [AllowImmutable] extended attribute, similar to #982 for resizable array buffers.

What solutions exist today?

No response

How would you solve it?

No response

Anything else?

See also tc39/proposal-immutable-arraybuffer#43.

Proposed structured clone changes: whatwg/html#11033.

@anba anba added addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest labels May 16, 2025
@annevk
Copy link
Member

annevk commented May 16, 2025

One thing that would be good to think about as I don't think we did this quite right with [AllowResizable] is where we would want to see this used. Because now we have resizable buffers in JavaScript, but nowhere to use them in the web platform. From a web developer perspective that is not exactly great.

For instance, we have a fair number of APIs that essentially copy the buffer input so ideally they should all adopt this out of the gate. No real reason for TextDecoder to still reject these the moment the JS engine supports them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements needs implementer interest Moving the issue forward requires implementers to express interest
Development

No branches or pull requests

2 participants