oi-metrology/ClientHub/Pages/RunHeaders.razor.cs
2023-01-15 18:40:32 -07:00

22 lines
542 B
C#

using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
namespace OI.Metrology.ClientHub.Pages;
public partial class RunHeaders
{
[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("initRunHeaders").AsTask();
}
return Task.CompletedTask;
}
}