Skip to content

Commit

Permalink
fix: Auto Loading JS before blazor starts (#283)
Browse files Browse the repository at this point in the history
Fixes #282

Co-authored-by: Benjamin Vertonghen <benjamin.vertonghen@append.be>
Co-authored-by: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 9, 2024
1 parent 20023b7 commit 5a9c856
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
@if (!IsWasmStandalone)
{
@((MarkupString)script)
<script src="_content/BlazorApplicationInsights/JsInterop.js"></script>
<script src="_content/BlazorApplicationInsights/BlazorApplicationInsights.lib.module.js"></script>
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

if (firstRender && IsWasmStandalone)
{
await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/BlazorApplicationInsights/JsInterop.js");
await JSRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/BlazorApplicationInsights/BlazorApplicationInsights.lib.module.js");

if (Config.Config != null)
{
Expand Down

0 comments on commit 5a9c856

Please sign in to comment.