Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable javascript in WinForms WebBrowser control?

How could I disable javascript entirely on WebBrowser in WinForms?

like image 328
bevacqua Avatar asked May 16 '12 17:05

bevacqua


People also ask

How do I stop a script error in WebBrowser control?

In this case, set ScriptErrorsSuppressed to false and suppress script errors in a handler for the HtmlWindow.

How do I use WebBrowser control?

The WebBrowser class in code behind is associated with the WebBrowser control. So when you drag and drop a WebBrowser control to the Form, a WebBrowser class instance is created in the code behind. The Navigate method of the WebBrowser class is used to open a URL in the WebBrowser.

What is WebBrowser control?

The WebBrowser control provides a managed wrapper for the WebBrowser ActiveX control. The managed wrapper lets you display Web pages in your Windows Forms client applications.


1 Answers

You can't. Client apps cannot disable JavaScript in the browser.

like image 155
Diodeus - James MacFarlane Avatar answered Sep 20 '22 05:09

Diodeus - James MacFarlane