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
@dominikh asked me to explain ArrayBufferView vs ArrayBuffer some more:
The ArrayBuffer is like a Go byte array of some fixed size. The ArrayBufferView is an abstract type, the concrete versions are Uint8Array, Int32Array, etc. Each ArrayBufferView is backed by an ArrayBuffer, just like a Go byte slice is backed by a byte array. Each ArrayBufferView has an offset and a length, also just like a Go slice. However, this offset and length and the read/write methods of an ArrayBufferView depend on the concrete type when finding the correct byte position in the underlying ArrayBuffer.
js.NewArrayBuffer
was added in 59323cd.If it's just a convenience/shortcut for what we could do before, what would the equivalent code be?
The text was updated successfully, but these errors were encountered: