Vereyon.Windows.WebBrowser
1.0.0
dotnet add package Vereyon.Windows.WebBrowser --version 1.0.0
NuGet\Install-Package Vereyon.Windows.WebBrowser -Version 1.0.0
<PackageReference Include="Vereyon.Windows.WebBrowser" Version="1.0.0" />
paket add Vereyon.Windows.WebBrowser --version 1.0.0
#r "nuget: Vereyon.Windows.WebBrowser, 1.0.0"
// Install Vereyon.Windows.WebBrowser as a Cake Addin #addin nuget:?package=Vereyon.Windows.WebBrowser&version=1.0.0 // Install Vereyon.Windows.WebBrowser as a Cake Tool #tool nuget:?package=Vereyon.Windows.WebBrowser&version=1.0.0
WebBrowser Tools
Vereyon's Windows.WebBrowser is a helper library for controlling and enhancing the System.Windows.Forms.WebBrowser
control which embeds Microsoft Internet Explorer. It improves JavaScript interoperability and enables controlling the IE version and GPU acceleration.
Documentation
Scripting Bridge
The ScriptingBridge
is a utility which makes it possible to invoke JavaScript member functions in the embedded browser and to receive return values and objects. This is in contrast to the HtmlDocument.InvokeScript()
method which can only invoke global functions. It also provides enhanced error handling by for example differentiating between a not found function and a function returning void.
Usage
If you for example want to invoke myObject.myFunction
as defined in the following JavaScript snippet:
var myObject = {
memberFunction: function()
{
return "some result";
}
};
You can do so using the ScriptingBridge
as follows where webBrowser
is your System.Windows.Forms.WebBrowser
instance:
var bridge = new ScriptingBridge(webBrowser, true);
var result = bridge.InvokeFunction<string>("myObject.myFunction", parameter);
Internet Feature Control
The InternetFeatureControl
is a utility class which can be used to control features of the System.Windows.Forms.WebBrowser
control.
Browser emulation
Using InternetFeatureControl.SetBrowserEmulation()
the Internet Explorer rendering engine version can be controlled.
GPU acceleration
Using InternetFeatureControl.SetGpuRendering()
GPU acceleration for rendering can be enabled and disabled.
WinInet Cache Control
The WinInetCacheControl
is a utility class which can be used to controle the WinInet cache.
Using InternetFeatureControl.ClearCache()
the WinInet cache can be fully cleared.
Unit tests
See the Windows.WebBrowser.Tests project for xUnit based unit tests.
More information
- Internet Feature Control Keys on MSDN
- Controlling WebBrowser Control Compatibility on MSDN Blog
- Web Browser Control – Specifying the IE Version
License
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
.NETFramework 4.0
- Newtonsoft.Json (>= 7.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 270 | 10/14/2023 |