bootsharp icon indicating copy to clipboard operation
bootsharp copied to clipboard

Support .NET -> JavaScript streaming

Open elringus opened this issue 2 years ago • 1 comments

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

elringus avatar Dec 23 '21 15:12 elringus

Maybe this: https://wicg.github.io/compression/#example-deflate-compress

Aloento avatar Apr 30 '22 18:04 Aloento