2024
2023
2022
2021
2020
2019
2018
2017
2016
2015
Posted on June 18, 2020
DotNetBrowser 2.1
This update enhances the DotNetBrowser with possibilities of the Chromium 79 and a range of features, adding to the convenience of interaction with the library.
What’s New
Chromium 79
The Chromium engine has been upgraded to version 79.0.3945.130
.
Access to Engine options
It got possible to access the Engine options when two or more Engine
instances run simultaneously. Now you can easily customize the Engine language, rendering mode and much more.
Flexible interaction with the Element functionality
Emulating user keyboard behaviour for testing or automation purposes became more convenient due Focus()
and Blur()
methods added to the Element
functionality.
IJsFunction
The IJsFunction
interface has been added in the JavaScript-.NET Bridge API. Now you can work with the JavaScript functions directly from the .NET code and pass the reference to a function from JavaScript to .NET and vice versa. For example:
IJsFunction alert = frame.ExecuteJavaScript<IJsFunction>("window.alert").Result;
alert?.Invoke(window, "Hello world!");
Fixed issues
- The
ArgumentException
occurring when minimizing and restoring aBrowserView
instance in WinForms or WPF application using Hardware-accelerated rendering mode. - The
UnobservedTaskException
event being raised intermittently during an Engine instance disposing process. - Several Engine instances being able to use the same user data folder.
- The Tab key not working properly in WinForms applications using the Off-screen rendering mode.
- The access to media devices (microphone and camera) not working properly.
- Incorrect
BrowserView
layout relative to a form when using Hardware-accelerated rendering mode in WinForms applications. - The crash occurring if the
Engine.Network.AcceptLanguage
property is set before creating anyBrowser
instance. - The Accept-Language parameter changed by the DotNetBrowser library.
Improvements
- DotNetBrowser now supports the Global Assembly Cache.
- DotNetBrowserHostWindow title was removed from the BrowserView control in WPF applications which use Hardware-accelerated rendering mode.
- The
Navigation.LoadUrl()
andFrame.LoadUrl()
methods do not require the protocol to be specified explicitly anymore. The library uses the same approach to detect the protocol as the one used by Google Chrome in the address bar. - The
StartDownloadHandler
property has been moved fromIDownloads
toIBrowser
interface. Please see the implementation comparison for v2.0 and 2.1:
v2.0
C#
engine.Downloads.StartDownloadHandler =
new Handler<StartDownloadParameters, StartDownloadResponse>((p) =>
{
return StartDownloadResponse.DownloadTo(Path.Combine(Path.GetTempPath(),
p.Download.Info.SuggestedFileName));
});
VB .NET
engine.Downloads.StartDownloadHandler =
New Handler(Of StartDownloadParameters, StartDownloadResponse)(Function(p)
Return StartDownloadResponse.DownloadTo(Path.Combine(Path.GetTempPath(),
p.Download.Info.SuggestedFileName))
End Function)
v2.1
C#
browser.StartDownloadHandler =
new Handler<StartDownloadParameters, StartDownloadResponse>((p) =>
{
return StartDownloadResponse.DownloadTo(Path.Combine(Path.GetTempPath(),
p.Download.Info.SuggestedFileName));
});
VB .NET
browser.StartDownloadHandler =
New Handler(Of StartDownloadParameters, StartDownloadResponse)(Function(p)
Return StartDownloadResponse.DownloadTo(Path.Combine(Path.GetTempPath(),
p.Download.Info.SuggestedFileName))
End Function)
Dropped functionality
- The
INetwork.TransactionStarted
event. You can use theINetwork.StartTransactionHandler
instead. - The
INetwork.BytesReceived
event. You can use theINetwork.ResponseBytesReceived
event instead. - The
INetwork.BytesSent
event. - The
Url
propertty is no longer available in theCanAccessFileParameters
used byINetwork.CanAccessFileHandler
.
Request evaluation licence
Download DotNetBrowser 2.1 (.NET Framework)
Download DotNetBrowser 2.1 (.NET Core)
Follow @DotNetBrowser to get notified of the library updates.
Subscribe to our RSS feed to get instant updates on new releases.