@inherits LayoutComponentBase @using System.Runtime.InteropServices.JavaScript
@Body
@code { [Inject] public IJSRuntime JSRuntime { get; set; } private IJSObjectReference _jsModule; /*protected override async Task OnAfterRenderAsync(bool firstRender) { base.OnAfterRender(firstRender); if (firstRender) { _jsModule = await JSRuntime.InvokeAsync("import", "./_content/MissNationSharedUI/assets/exampleJsInterop.js"); await _jsModule.InvokeVoidAsync("getMessage"); } }*/ protected override async Task OnInitializedAsync() { await base.OnInitializedAsync(); _jsModule = await JSRuntime.InvokeAsync("import", "./_content/MissNationSharedUI/assets/exampleJsInterop.js"); await _jsModule.InvokeVoidAsync("getMessage"); } }