Skip to content

egil/BlazorJSInteropExtensions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blazor JSInterop Extensions

This library provides a set of handy extension methods to IJSRuntime, that makes it easy to make perform ad-hoc calls to JavaScript methods on DOM elements or the window or the document object. It also makes it easy to read and set properties on a DOM element and the window or the document object.

Examples

To invoke a method on a DOM element, that you have a reference to via an ElementReference, use InvokeOn or InvokeOn<T>, if you need a return value.

Usage

  1. Add the package to your Blazor WebAssembly or Blazor Server project via Nuget.
  2. Include <script src="_content/BlazorJSInteropExtensions/blazorJsInteropExtensions.js"></script> in your index.html or _Host.cshtml.

About

Makes it easy to call JavaScript functions on DOM elements and set and get properties of objects, without having to write custom JavaScript.

Resources

Stars

Watchers

Forks

Packages

No packages published