In the new (non-Blazor) browser-wasm
runtime of .NET 7 there are JSImport
attributes for communicating with Javascript imports. Many .NET types are supported for passing as arguments to Javascript functions.
If you pass a Span<>
or ArraySegment<>
then you must marshal them as a MemoryView
, but I can't see any documentation for what that actually is. What does the JS function actually receive? Is it a wrapper for a typed array?