-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.The issue was created by a issue mover bot. The author may not be the actual author.Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issueIndicates that the team needs a repro project to continue the investigation on this issuearea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-jsinteropThis issue is related to JSInterop in BlazorThis issue is related to JSInterop in Blazor
Description
This issue has been moved from a ticket on Developer Community.
[severity:It bothers me. A fix would be nice]
Blazor/Wasm .Net8 VS 20
"showAlert" JavaScript functon can't not be found in wwwroot/JScripts/SiteScript.js
by the standard coding scheme
- Index.html
<body>
<script src="_framework/blazor.webassembly.js"></script>
<script src="JScripts/SiteScript.js"></script>
</body>
- In wwwroot/JScripts/SiteScript.js file
function showAlert(name) {
alert('Hello ' + name);
}
- In Register.razor
protected override async Task OnInitializedAsync()
{
await JSRuntime.InvokeVoidAsync("showAlert", "Unkown user");
//await JSRuntime.InvokeVoidAsync("EnableAllSubDivs", "EditUser");
}
Original Comments
Feedback Bot on 9/19/2024, 06:35 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Metadata
Metadata
Assignees
Labels
Author: Migration Bot 🤖The issue was created by a issue mover bot. The author may not be the actual author.The issue was created by a issue mover bot. The author may not be the actual author.Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.The author of this issue needs to respond in order for us to continue investigating this issue.Needs: ReproIndicates that the team needs a repro project to continue the investigation on this issueIndicates that the team needs a repro project to continue the investigation on this issuearea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor Componentsfeature-blazor-jsinteropThis issue is related to JSInterop in BlazorThis issue is related to JSInterop in Blazor