DEV Community

loading...
Cover image for Interacting with JavaScript Objects using the new IJSObjectReference in Blazor

Interacting with JavaScript Objects using the new IJSObjectReference in Blazor

swimburger profile image Niels Swimberghe Originally published at swimburger.net on ・1 min read

New API's to interact with JavaScript from .NET were added with the introduction of Blazor. Using these API's you can invoke JavaScript functions from .NET and .NET methods from JavaScript. This is also referred to as ' JavaScript interoperability'.

The JavaScript interoperability API's provided by Microsoft live under Microsoft.JSInterop namespace. These capabilities were showcased at a previous article: "Communicating between .NET and JavaScript in Blazor with in-browser samples".

Some additional API's have now been introduced with the release of .NET 5. One very important API in particular was introduced: IJSObjectReference.

Continue reading at swimburger.net

Discussion (0)

pic
Editor guide