Hello,
Thanks for using Microsoft Q&A and thanks for reaching out to us.
Have you tried the below solution. If not, try it and see if it helps.
- When you press "F5" in VS to debug your app, it runs Project.vshost.exe as the process name. If you run the same app from the command line, it will show up as Project.exe, and the JavaScript errors will go away.
- Seems like IE sees the app running visa via VSHOST and decides this is fishy and disables JavaScript from loading correctly.
- So go to your project setting for your executable. Select "Debug" options. Select "Start External Program". Browse to and select Debug\YourProgram.exe (NOT YourProgram.vshost.exe). Save, recompile, and hit F5.
- Everything should work as per usual now, and Visual Studio even attaches to the process for you automatically.
Or
you can try using ScriptErrorSuppressed to get rid of those errors.
webBrowser1.ScriptErrorsSuppressed = true;
Also Please go through this blog post for more reference :
I hope this information helps.
Please feel free to reach back if you have any further questions regarding this matter.