BlazorJsManager 1.0.9

dotnet add package BlazorJsManager --version 1.0.9
                    
NuGet\Install-Package BlazorJsManager -Version 1.0.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorJsManager" Version="1.0.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazorJsManager" Version="1.0.9" />
                    
Directory.Packages.props
<PackageReference Include="BlazorJsManager" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add BlazorJsManager --version 1.0.9
                    
#r "nuget: BlazorJsManager, 1.0.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=BlazorJsManager&version=1.0.9
                    
Install as a Cake Addin
#tool nuget:?package=BlazorJsManager&version=1.0.9
                    
Install as a Cake Tool

blazor-js-manager

Latest version:

NuGet Version GitHub commits since latest release

Status:

CodeQL Dependabot Updates

Small package that adds services that make managing and invoking JS scripts in Blazor a breeze.

Features

  • Simple JS module loading and invocation for Blazor (WASM & Server)
  • Dependency injection for JS modules
  • Type-safe JS interop
  • Automatic module disposal

Installation

Install via NuGet:

 dotnet add package BlazorJsManager

Usage

  1. Register services in your Program.cs:
builder.Services.AddJsModuleResolver();
  1. Inject and use the resolver in your component or service:
@inject IJsModuleResolver JsModuleResolver

@code {
    private IJSObjectReference? _module;

    protected override async Task OnInitializedAsync()
    {
        _module = await JsModuleResolver.ResolveAsync("myModule");
        await _module.InvokeVoidAsync("myJsFunction");
    }
}
  1. Options: You can configure options via AddJsModuleResolver(configure: options => { ... }).

API

  • IJsModuleResolver.ResolveAsync(string path) – Loads a JS module and returns an IJSObjectReference.
  • Extension methods for common scenarios (see source for details).

License GitHub License

See License for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.9 101 5/18/2025
1.0.8 99 5/18/2025
1.0.7 97 5/18/2025
1.0.6 100 5/18/2025
1.0.5 99 5/18/2025
1.0.4 96 5/18/2025
1.0.2 98 5/18/2025
1.0.1 107 5/18/2025
0.1.4 96 5/18/2025