Blazor: Provide common callback mechanism for when Blazor starts
See original GitHub issueIs your feature request related to a problem? Please describe.
We can currently set autostart=“false” on the the Blazor <script>
tag and then use the JavaScript Blazor.start({}).then(.........)
to execute JavaScript we need to run as soon as Blazor starts.
Using this approach is not suitable for library developers, because Blazor.start can only be called once.
Describe the solution you’d like
Please provide a new Blazor.onStarted
function that accepts a callback to execute once Blazor has started. It should be possible to call this function more than once so many scripts can be notified. If Blazor has already started, the callback should be executed immediately.
Or
Allow us to call Blazor.start()
without any parameters which will complete the promise when Blazor has finished starting up, or immediately if it has already initialized.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:11 (8 by maintainers)
Top Results From Across the Web
ASP.NET Core Razor component lifecycle
StateHasChanged is called automatically for EventCallback methods. For more information on event callbacks, see ASP.NET Core Blazor event ...
Read more >3 Ways to Communicate Between Components in Blazor
In this post, I show you 3 different options you can use to manage communication between components in your Blazor applications.
Read more >5 Steps To Implement Event Call-Backs In Blazor
In this article, we learned what are the steps you need to take to implement callback events in blazor, we demonstrated the same...
Read more >Understanding and Controlling the Blazor WebAssembly ...
Blazor WebAssembly applications do a lot of different things at startup. This article shows what's going on and where you can take control....
Read more >Blazor - event callback from descendant
Basically a service that registered at startup and can be injected into any component. Child3 will call a "Send" method to send the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is the bug I mentioned in Teams earlier that is fixed. The
Needs: Author Feedback
label was applied but not properly removed when @mrpmorris responded. It’s all fixed now.@anurse can you take a look? The bot is doing bot things 😵