-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Ability to inject script tag into head element? #37
Comments
@fingers10 Actually, injecting |
@fingers10 You can use this method as well. var module = await JS.InvokeAsync<IJSObjectReference>("import", "/lib/xxx.js");
await module.InvokeVoidAsync(xxx); |
@Alerinos does this approach adds the |
@fingers10 Why can't you do this in _Layout? |
@Alerinos do you mean |
Hi @Alerinos , Thank you for helping us! By the way, I guess that @fingers10 is talking about his website "https://ilovedotnet.org/" (The source code is here). And that website is hosted on GitHub Pages. The website is a Blazor WebAssembly app without ASP.NET Core hosting, so he might not be able to take a server-side strategy such as you suggested. Hi @fingers10,
I think the answer is no, and he may not want to mean that. |
I understand, in that case you have to write JS code and then execute it in blazor. Example: JS.InvokeVoidc("loadJS", "url.js") |
Current in
blazor wasm index.html
there is now way to get environment and load scripts based on environment. If we add a feature to this package to inject script intohead
tag, It will be awesome.The text was updated successfully, but these errors were encountered: