.NET 7 JS Interop Guide #860
SerratedSharp
started this conversation in
Show and tell
Replies: 1 comment
-
This is a quite extensive documentation :) Great work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Something maybe useful to others implementing JS interop. I've been building a guide to JS interop to collect things I've learned for awhile, since alot of the MS documentation focuses on Blazor even though alot of it is platform agnostic. Recently did alot of work to clean it up and reorganize it for .NET 7:
https://github.com/SerratedSharp/CSharpWasmRecipes?tab=readme-ov-file
A couple things I have done that I think may be unique is an approach to wrapping instance methods of a JS instance without needing to write a JS shim nor write the JSImport declaration: https://github.com/SerratedSharp/CSharpWasmRecipes?tab=readme-ov-file#proxyless-instance-wrappers
I imagine someone else has done this by now, but exposing a JS event as a classic C# event was something that at the time I ended up writing from scratch:
https://github.com/SerratedSharp/CSharpWasmRecipes?tab=readme-ov-file#wrapping-a-js-event-as-a-c-event
Beta Was this translation helpful? Give feedback.
All reactions