Timeline for How to invoke JS async method from Blazor
Current License: CC BY-SA 4.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 9, 2019 at 14:09 | vote | accept | Bercovici Adrian | ||
Feb 6, 2019 at 14:53 | answer | added | Bercovici Adrian | timeline score: 6 | |
Feb 6, 2019 at 14:44 | comment | added | Kirk Woll |
No, async/await in Javascript is pretty much the same as in C#. It doesn't magically hook up to random events to return things. You'll need to use the deferred pattern in Javascript (analogous to TaskCompletionSource in C#) (The link points out it's deprecated, but is more to the point, and you can figure out the modern syntax from the links there)
|
|
Feb 6, 2019 at 14:34 | comment | added | Bercovici Adrian |
The events onload and onloadend are fired after the line readAsText so if i return anything after that it won't return anything to Blazor .I thought that it would somehow pipe the return of onloadend to Blazor .
|
|
Feb 6, 2019 at 14:32 | comment | added | Kirk Woll | Your javascript function is not returning anything at all -- what exactly are you expecting? | |
Feb 6, 2019 at 14:31 | history | edited | Bercovici Adrian | CC BY-SA 4.0 |
deleted 6 characters in body
|
Feb 6, 2019 at 14:30 | comment | added | Bercovici Adrian |
I just tried with async having no idea what else to try.It does not return anything with or without async .
|
|
Feb 6, 2019 at 14:29 | comment | added | Kirk Woll | Your javascript function is not awaiting anything so in what sense is it actually async? | |
Feb 6, 2019 at 13:15 | history | edited | Bercovici Adrian | CC BY-SA 4.0 |
edited title
|
Feb 6, 2019 at 12:48 | history | edited | Bercovici Adrian | CC BY-SA 4.0 |
edited title
|
Feb 6, 2019 at 11:13 | history | asked | Bercovici Adrian | CC BY-SA 4.0 |