[Blazor] WebAssembly JS initializers don't execute unless webAssembly
options are provided to Blazor.start()
#54049
Labels
area-blazor
Includes: Blazor, Razor Components
bug
This issue describes a behavior which is not expected - a bug.
Priority:1
Work that is critical for the release, but we could probably ship without
Milestone
Summary
The
beforeWebAssemblyStart
andafterWebAssemblyStarted
JS initializer callbacks do not run unlessautostart="false"
and awebAssembly
options object is passed toBlazor.start()
.This bug does not affect any of
beforeWebStart
,afterWebStarted
,beforeServerStart
, andafterServerStarted
.Steps to reproduce
dotnet new blazor -int WebAssembly
)wwwroot
folder of the server project (e.g.,MyBlazorApp.lib.module.js
)/counter
pageApp.razor
to include the following:/counter
page, and observe that the log messages now show up in the browser console.Other info
.NET Version: Tested on 8.0.2 and 8.0.0, and the bug reproduced in both
The text was updated successfully, but these errors were encountered: