You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ArrayBuffer is almost never what you want because you can't read from one directly. You have to create a view such as a Uint8Array to actually read it.
Almost all APIs which accept an ArrayBuffer also accept a Uint8Array, and some APIs require a Uint8Array, so it's rare for a Uint8Array to be less convenient than an ArrayBuffer.
This is currently somewhat inconsistent: some APIs (like Response) provide an ArrayBuffer, while others (like TextEncoder) provide a Uint8Array. Having this written down as a principle could help with that.
I'm not sure what the process here is, but if this is accepted I'm happy to send a PR adding this.