question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blazor: Provide common callback mechanism for when Blazor starts

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
analogrelaycommented, Dec 6, 2019

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.

1reaction
javiercncommented, Dec 6, 2019

@anurse can you take a look? The bot is doing bot things 😵

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found