发布日期 2021年09月24日
DotNetBrowser 2.9
What’s new
Chromium 92
The Chromium engine has been upgraded to version 92.0.4515.159.
Load progress event
The INavigation
interface has been extended with the LoadProgressChanged
event. It allows getting notifications about load progress:
browser.Navigation.LoadProgressChanged += (s, e) =>
{
//The value indicating the loading progress of the web page.
double progress = e.Progress;
};
Mouse events
We added the recognition of the additional (back/forward) mouse buttons. Here is how you can use the new feature to suppress the corresponding mouse events, for example:
browser.Mouse.Pressed.Handler =
new Handler<IMousePressedEventArgs, InputEventResponse>(e =>
{
if (e.Button == MouseButton.Back || e.Button == MouseButton.Forward)
{
return InputEventResponse.Suppress;
}
else
{
return InputEventResponse.Proceed;
}
});
browser.Mouse.Released.Handler =
new Handler<IMouseReleasedEventArgs, InputEventResponse>(e =>
{
if (e.Button == MouseButton.Back || e.Button == MouseButton.Forward)
{
return InputEventResponse.Suppress;
}
else
{
return InputEventResponse.Proceed;
}
});
JavaScript-.NET Bridge
Now you can work with .NET dictionaries having integer or string keys or other .NET objects having an indexer with a single integer or string parameter in the JavaScript code:
IJsObject document = Browser.MainFrame.ExecuteJavaScript<IJsObject>("document").Result;
Dictionary<string, string> dictionary = new Dictionary<string, string>
{
{"key1", "value1"},
{"key2", "value2"}
};
document.Properties["dotNetDictionary"] = dictionary;
JavaScript code:
var value = document.dotNetDictionary["key1"];
Fixed issues
- Keyboard focus being lost in the WPF application when reconnecting to the remote computer via RDP.
- Focus flickering when launching multiple
BrowserView
instances.
Request evaluation license
Download DotNetBrowser 2.9 (.NET Framework)
Download DotNetBrowser 2.9 (.NET Core)
关注 @DotNetBrowser ,获取库的更新动态。
订阅我们的 RSS feed ,获取最新版本动态。