bootsharp
bootsharp copied to clipboard
Support .NET -> JavaScript streaming
While Blazor provide APIs for raw byte streaming between .NET and JavaScript (doc), .NET to JS streaming relies on browser-only Response
type:
https://github.com/Elringus/DotNetJS/blob/97647de97a9ffe0aafdc1941a947f79f9816b9d8/JavaScript/dotnet-js-interop/src/main.js#L458
Associated calls in the runtime: https://github.com/dotnet/aspnetcore/blob/release/6.0/src/Components/Web.JS/src/GlobalExports.ts#L80 https://github.com/dotnet/aspnetcore/blob/release/6.0/src/Components/Web.JS/src/StreamingInterop.ts#L24
We have to add environment-agnostic streaming implementation and test it: https://github.com/Elringus/DotNetJS/blob/97647de97a9ffe0aafdc1941a947f79f9816b9d8/JavaScript/dotnet-runtime/test/interop.js#L125
Maybe this: https://wicg.github.io/compression/#example-deflate-compress