Unable to call JavaScript in onintialized, new Exception about not being allowed to call JS in static mode
This issue has been moved from a ticket on Developer Community.
[severity:It bothers me. A fix would be nice] [regression] After upgrading to Visual Studio version 10 I had Blazor apps fail when they ran ok on version 9. I would get an exception that jsruntime can't be called in oninitialized as it is in static mode and you can't use it until after render. In version 9 I could call Javascript to get info about the client browser for language, nationality and size. I used this info in the rendering mode. Now I have to get the info after render and re-render.
Original Comments
Feedback Bot on 12/9/2025, 10:00 AM:
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.
Thank you for filing this issue. In order for us to investigate this issue, please provide a minimal repro project that illustrates the problem without unnecessary code. Please share with us in a public GitHub repo because we cannot open ZIP attachments, and don't include any confidential content.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.
See our Issue Management Policies for more information.