Closed
Description
Open questions with JavaScript initializers:
- Should we update the arguments to
beforeStart
to make it easier to detect which .NET runtime (Server/WebAssembly) is starting? - In the case of Blazor WebAssembly, should we wait to invoke
beforeStart
until we know for sure that Blazor WebAssembly is starting? Currently,beforeStart
gets invoked during the Blazor WebAssembly loading procedure, but this doesn't always indicate that Blazor WebAssembly will be used (consider auto mode). - In the case of Blazor Server, should the
afterStarted
callback run each time a new circuit is created? We plan on closing circuits automatically if all Blazor Server components get removed from the page. - Should
beforeStart
execute immediately afterBlazor.start()
is called when usingblazor.web.js
? Currently,beforeStart
only executes just before Blazor WebAssembly or Blazor Server starts up.- Or, alternatively, should the module be imported as soon as
Blazor.start()
gets called, butbeforeStart
only gets called when Blazor Server or WebAssembly starts?
- Or, alternatively, should the module be imported as soon as
- Should we add arguments to the
afterStarted
callback to indicate which .NET runtime started?