Closed
Description
You can convert a Go slice into a TypedArray by using js.TypedArrayOf(...)
, but there is apparently no way of doing the reverse operation.
You can write a function to Index()
every byte value in an ArrayBuffer and put them in a byte slice, but this is cumbersome and incurs unacceptable overhead. There should be a function to directly copy the bytes into the Go heap, such as what js.Value.String()
does.