Skip to content

Conversation

MattiasBuelens
Copy link
Contributor

As of whatwg/webidl#1311, WebIDL has its own SharedArrayBuffer type. I added a conversions.SharedArrayBuffer function to properly recognize this.

I also noticed that this conversion was incorrectly throwing an error, so I fixed that:

const converted = conversions.ArrayBuffer(new SharedArrayBuffer(0), { allowShared: true });

Questions:

  • The old way of denoting this was [AllowShared] ArrayBuffer. However, that's no longer supported: you can only apply [AllowShared] on a buffer view type. For now, I've kept the allowShared option around in conversions.ArrayBuffer, but perhaps we should remove it instead?

@domenic
Copy link
Member

domenic commented Sep 2, 2025

  • For now, I've kept the allowShared option around in conversions.ArrayBuffer, but perhaps we should remove it instead?

Removing it seems better to me!

@MattiasBuelens
Copy link
Contributor Author

All right, I'll do that.

I'll keep the options parameter around though, since I still want to add support for [AllowResizable] in a follow-up PR. 😉

@domenic domenic merged commit 0325ad1 into jsdom:master Sep 8, 2025
3 checks passed
@domenic
Copy link
Member

domenic commented Sep 8, 2025

Let me know if you'd like me to cut a new release now, or wait for the [AllowResizable] support first.

@MattiasBuelens
Copy link
Contributor Author

Opened #51. 😉

@MattiasBuelens MattiasBuelens deleted the sharedarraybuffer branch September 8, 2025 05:47
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