Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to use Js Interop with Mobile Blazor Bindings?

I try Mobile Blazor Bindings, following this tutorial : https://learn.microsoft.com/fr-fr/mobile-blazor-bindings/walkthroughs/todo-app

I want to use HTML CSS and JS code to create a test app.

In razor page, try to inject @inject IJSInProcessRuntime jsRuntime but it make the app crash.

Is it possible to use Js Interop with Mobile Blazor Bindings ?

like image 900
Erakx Avatar asked Dec 01 '25 03:12

Erakx


1 Answers

Yes, it's possible. After some searching i find a way to do that. It's still in development, so it's all on your own risk. First, you need to download last version of master branch of MobileBlazorBindings (or clone repo to your local storage). Then you need to do some changes to source files. After that you need to compile these projects and pack them to nuget package. Link how to do that (skip first step). Then add these nuget packages and dll to your project from local storage. There some helpful link (If package version is not 0.5.41 you can just rename files with that version, work for me). And now you can use @inject IJSRuntime jsRuntime and JS.InvokeVoidAsync("function", params); in your razor component.

Find more there

like image 54
Vlad Terentev Avatar answered Dec 03 '25 06:12

Vlad Terentev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!