Welcome Guest Search | Active Topics | Sign In | Register

How to disable javascript error in WebBrowser control Options
Zhongyi Sun
Posted: Tuesday, August 11, 2015 2:13:27 PM
Rank: Newbie
Groups: Member

Joined: 8/11/2015
Posts: 5
How can I suppress an error from JavaScript inside webbrowser or webview control?
eo_support
Posted: Tuesday, August 11, 2015 3:07:26 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

When a JavaScript error occurs, the WebView's ConsoleMessage will be raised:

http://www.essentialobjects.com/doc/eo.webbrowser.webview.consolemessage.aspx

You can ignore it completely. However this does not "supress" the error on the JavaScript side. So for example, if your JavaScript has a try catch block and the code inside the try block raises an error, then the catch block will catch it no matter what --- in another word, there is no way for you to alter the behavior of the JavaScript code engine. Your only choice is to ignore the error notification or not.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.