- Webview2 SDK updated to the last version 1.0.2210.55 / 1.0.2194-prerelease.
This SDK introduces a browser extension API, but i haven´t tried it. - Added an example of how to use the ICoreWebView2EnvironmentOptions to create a custom scheme or protocol in 'examples\misc.pb'.
https://github.com/omegakode/PBWebview2
Note: This is not a wrapper, is a port of the C/C++ API, so you have full access to the control.
To test it you need to run the WebView2 Runtime Installer(disable ad blockers):
https://developer.microsoft.com/en-us/m ... /webview2/
To test prereleases you need to install edge dev or canary:
https://www.microsoftedgeinsider.com/en-us/download
Now you can use either the stable SDK version or the prerelease version to try the experimental apis.
If you are only interested in the stable release install only the WebView2 runtime, the prerelease will not work.
If you are interested in both the stable and prerelease versions uninstall the WebView2 runtime and install edge dev only.
To use the stable release in code simply include the PBWebview2.pb file located in the project root folder, to use the prerelease version include the PBWebview2.pb file located in the prerelease folder.
The examples use the stable version include, but they also work with the prerelease one.
Then clone or download the project and simply run the examples with DPI aware enabled.
They are configured for 64bit, to test 32bit copy WebView2Loader.dll from the x86 folder to the examples folder.
You can interact from javascript easily through a purebasic object in 'PB_Host_Object.pb', see examples. You can load the content from the executable as a resource or from disk.
There are a lot of files in the project but the only one you need to include in your project is 'PBWebView2.pb'.
It may seem a little complicated at first because the creation is asynchronous but is simple, see 'basic_browser_async.pb' for the most basic example.
It uses the excellent VCall module from Wilbert.
License is MIT.
If you find it useful there is a donate button in the github readme or here:
Webview2 Reference:
https://docs.microsoft.com/en-us/micros ... /webview2/
Webview2 SDK, change extension to .zip
https://www.nuget.org/packages/Microsoft.Web.WebView2
Bootstrap example
Ohm Browser