TeamDev DotNetBrowser V1.21
Click Here ->->->-> https://geags.com/2tuBMx
What's New in TeamDev DotNetBrowser v1.21
TeamDev DotNetBrowser is a.NET library that allows you to embed a Chromium-based browser component into your WPF or WinForms applications. With DotNetBrowser, you can display and process HTML5, CSS3, JavaScript, Flash and other web content in your.NET app.
In this article, we will review the new features and improvements introduced in DotNetBrowser v1.21, which was released on August 20, 2019.
Certificate Chain
One of the new features in DotNetBrowser v1.21 is the ability to get the intermediate certificate list retrieved from the server that can be used to reconstruct and verify the complete certificate chain. This can be useful for security purposes, such as checking the validity and trustworthiness of a website.
To access the intermediate certificates, you can use the CertificateVerifyParams.IntermediateCertificates property in the Browser.CertificateVerifyHandler event handler. For example:
browser.CertificateVerifyHandler += (sender, e) =>
{
var intermediateCertificates = e.Parameters.IntermediateCertificates;
// do something with the certificates
};
Disable Form Autofill Functionality
Another feature in DotNetBrowser v1.21 is the option to enable or disable the auto-fill functionality for web forms. Auto-fill can be convenient for users who want to save time and avoid typing repetitive information, such as names, addresses, passwords, etc. However, it can also pose some privacy and security risks, such as exposing sensitive data to third parties or malicious scripts.
To control the auto-fill functionality, you can use the BrowserContext.AutoFillEnabled property. For example:
var browserContext = BrowserContext.DefaultContext;
browserContext.AutoFillEnabled = false; // disable auto-fill
var browser = BrowserFactory.Create(browserContext);
JavaScript Requests Focus
Sometimes, a web page may use JavaScript to request setting focus to a browser instance. For example, this can happen when a pop-up window is opened or when a user clicks on a text field. In DotNetBrowser v1.21, you can get notifications when such requests occur by handling the Browser.FocusRequested event.
The event handler provides you with the FocusRequestedEventArgs object that contains the FocusType property. This property indicates whether the focus request was initiated by mouse or keyboard input. For example:
browser.FocusRequested += (sender, e) =>
{
var focusType = e.FocusType;
// do something based on the focus type
};
Hide Scrollbars
If you want to hide the scroll bars on the web pages loaded in DotNetBrowser, you can use the --hide-scrollbars switcher in v1.21. This can be useful when you want to take an image of a web page without showing the scroll bars.
To apply the switcher, you need to pass it as an argument to the BrowserPreferences.SetChromiumSwitches() method before creating any browser instances. For example:
BrowserPreferences.SetChromiumSwitches(\"--hide-scrollbars\");
var browser = BrowserFactory.Create();
Bug Fixes and Improvements
In addition to the new features, DotNetBrowser v1.21 also includes several bug fixes and improvements that make the library work even smoother. Some of them are:
The Chromium binaries verification process now respects the modification date.
The pop-up window size and location are respected when passed by JavaScript.
The NullReferenceException in SpellCheckerService and ZoomService for multiple BrowserContext instances is fixed.
The WinFormsBrowserView component in heavyweight rendering mode is not disposed when removed from a form.
The back and forward mouse buttons work correctly in WPFBrowserView (heavyweight rendering ec8f644aee