[wasm] Add support for marshalling ArrayBuffer and TypeArrays (#10023)
* Add support for marshalling ArrayBuffer and TypeArrays from JavaScript to C#.
- The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer. More Info ---> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays#ArrayBuffer
- JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data. (...). More Info ---> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
- Some examples of API's that use these are Fetch, WebGL, Canvas, Web Audio API, XMLHttpRequests, WebSockets, Web Workers, Media Source API and File APIs.
| ArrayBuffer | uint8_t | byte[] | byte or Byte (unsigned byte)
| Int8Array | int8_t | sbyte[] | byte or SByte (signed byte)
| Uint8Array | uint8_t | byte[] | byte or Byte (unsigned byte)
| Uint8ClampedArray| uint8_t | byte[] | byte or Byte (unsigned byte)
| Int16Array | int16_t | short[] | short (signed short)
| Uint16Array | uint16_t | ushort[] | ushort (unsigned short)
| Int32Array | int32_t | int[] | int (signed integer)
| Uint32Array | uint32_t | uint[] | uint (unsigned integer)
| Float32Array | floa t | float[] | float
| Float64Array | double | double[] | double
- Added tests to the bindings-test test harness.
* Add support for marshalling TypeArrays from C# to JavaScript.
- Add tests to test harness.