using Microsoft.AspNetCore.Components; using Microsoft.JSInterop; namespace OI.Metrology.ClientHub.Pages; public partial class AwaitingDisposition { [Inject] protected IJSRuntime? JSRuntime { get; set; } protected override Task OnAfterRenderAsync(bool firstRender) { if (firstRender) { if (JSRuntime is null) throw new NullReferenceException(nameof(JSRuntime)); return JSRuntime.InvokeVoidAsync("initAwaitingDisposition").AsTask(); } return Task.CompletedTask; } }