-
Notifications
You must be signed in to change notification settings - Fork 645
[WIP] add local and session storage support #201
Conversation
865a48c
to
9bfd43d
Compare
looks interesting, Q: would be great to have some events raised from the JavaScript when things change etc. and possibly async methods at the .net side. Great work looking forward to playing with this |
Thanks @LunicLynx for this - it looks really interesting! Rather than coupling it to Microsoft.AspNetCore.Blazor.Browser.dll, this looks like a candidate to be the first real Blazor add-on NuGet package, which would be pretty cool. We haven't yet figured out all the details of how such packages would work (e.g., how they include JavaScript and how it gets built into the Blazor application), but I do have some ideas. Would you be interested in working with me on figuring out how that should best work, and making this into the first proper Blazor package? |
@SteveSandersonMS @LunicLynx it’s definitely sweet to see this working, played around and I’ve got a geolocation interop working and now looking at SignalR now, but wondering how/if these interop packages would hook in without referencing or changing the current Browser/Browser.JS implementations Also how would you envision the package/namespace/dlls would this be something akin to (company).AspNetCore.Blazor.Browser.{lib}[.JS] |
@SteveSandersonMS definitely interested. In one ASP.NET standup you said something about how the whole interop will be different from the first prototype, but i wasn't able to find something in the current bits. I think this will have an effect on how to solve this. |
9bfd43d
to
b4a16ea
Compare
Ok, i did some further investigation. Atm First i (just as a test) extended return foundAssemblies.Values.Select(assembly => (
$"/{assembly.Definition.Name.Name}.dll",
assembly.Data))
.Concat(new[] { ("/my.js", Encoding.Default.GetBytes("alert('Hello world');")) }); Which resulted in creating a My thought here is that So i created two projects
One containing the c# part and one the js, as the But here is the first problem, to make this work an app must reference both assemblies, which is not the case with the Which leads me to the general question: Should the js actually be loaded by the browser over network or should it be extracted from the embedded resources and injected into the page on the browser side it self? |
closed. see: #205 |
A storage support implementation. Not really sure if this is the way how it should be done.
Would love some feedback!