Home

Awesome

Build Status Nuget

GitHub GitHub tag (latest SemVer pre-release)

About

The EventHorizon.Blazor.Server.Interop is a slim project I created to help with common Blazor JavaScript Interop actions. This project is a derived work from the <a href="https://github.com/canhorn/EventHorizon.Blazor.Interop">canhorn/EventHorizon.Blazor.Interop</a> project that works with Blazor Server, with the caveat of not having the performance the other has.

The <a href="https://github.com/canhorn/EventHorizon.Blazor.Interop">canhorn/EventHorizon.Blazor.Interop</a> is focused on WASM, and provides the best interop performance between .NET and the JavaScript client code.

Usage

This library requires the usage of the IJSRuntime, you will need to attach one manually before usage.

In "App.razor"

@code {
    [Inject]
    public IJSRuntime JSRuntime { get; set; }

    protected override void OnInitialized()
    {
        EventHorizonBlazorInterop.JSRuntime = JSRuntime;
    }
}

Sample

The EventHorizon.Blazor.Server.Interop.Sample Project contains a suite of performance tests.

Use Libraries

MediatR

Inspiration