简体   繁体   中英

C# WebBrowser - how to get rid of JavaScript error prompt?

I'm working with C# WebBrowser, and sometimes when the page is loaded (not always) I get following prompt:

An error has occured in the script on this page.
Line 1
Char 45774
Error Object required
Code 0
URL http://xxx.i_replaced_the_link_here.com/blah_BLAH_blah123

Do you want to continue running scripts on this page?
Yes / No

I want to continue, but I cannot be constantly clicking the Yes button.

How do you think I can fix it?

You can set the WebBrowser.ScriptErrorsSuppressed control property to true . You wont be getting any errors that way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM