Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Multiple js file import not working with IJSObjectReference

$
0
0

Importing multiple .js modules for JsInterop in a Blazor component as follows:

[Inject]public IJSRuntime JS { get; set; }public IJSObjectReference? _jsModule;protected override async Task OnAfterRenderAsync(bool firstRender){ if(firstRender) {  _jsModule = await JS.InvokeAsync<IJSObjectReference>("import",   new string[] {"./lib1.js","./lib2.js"   }  ); }}

this result in loading only the first js file (lib1.js).Any ideas?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>