During startup of the app/WebWindow, I would like to inject JavaScript code from .NET. Afaik there is no way to do this without also having some initial JavaScript running on the loaded web assets.
Scenario: I have built a library that enables some built-in features for calling between JavaScript and .NET, but I'd like to be able to allow consumers of the library to simply call window.EnableNativeApi() and it should inject not only the .NET handling, but also a small JavaScript that maps the calls. This would avoid having to explain to consumers to copy the JavaScript into their wwwroot folder.
During startup of the app/WebWindow, I would like to inject JavaScript code from .NET. Afaik there is no way to do this without also having some initial JavaScript running on the loaded web assets.
Scenario: I have built a library that enables some built-in features for calling between JavaScript and .NET, but I'd like to be able to allow consumers of the library to simply call window.EnableNativeApi() and it should inject not only the .NET handling, but also a small JavaScript that maps the calls. This would avoid having to explain to consumers to copy the JavaScript into their wwwroot folder.