Numeric progress for WASM loading #19565
stevemonaco
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I was trying to write a progress bar for our WASM app and hit a block with how Blazor does it (
--blazor-load-percentage
css variable) which was forwarded automatically in a deep part ofdotnet
which I didn't think we could modify and provide myself.Thanks to Cédric from the Telegram for the initial solution. Modify wwwroot/main.js like so:
withModuleConfig
andonDownloadResourceProgress
being the key parts. This updates on a per-file basis, but real apps have lots of WASM files to download, so it's not a big problem.For a Blazor-like approach, use:
I suspect this will be built into Avalonia someday sooner-than-later.
Beta Was this translation helpful? Give feedback.
All reactions