Page 10 of 13
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Thu Oct 19, 2023 9:56 pm
by infratec
Fixed a bug when #PB_Any was used for the WebView2Gadget()
PBWebView2 & WebView2Gadget
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Oct 20, 2023 12:57 pm
by Kiffi
thanks for providing the new package! However, the Examples folder does not seem to be included(?)
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Oct 20, 2023 4:27 pm
by infratec
I only provided the WebView2Gadget() as replacement for the PB WebGadget().
So I reduced the zip file to the minimum which is required to run and show the WebView2Gadget().
Inside of the WebView2Gadget.pbi is an example. If you load this file and run it, it will show 2 Gadgets and different possibilities to handle them.
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Sat Oct 21, 2023 11:27 pm
by Kiffi
infratec wrote: Fri Oct 20, 2023 4:27 pmInside of the WebView2Gadget.pbi is an example. If you load this file and run it, it will show 2 Gadgets and different possibilities to handle them.
thanks for the hint!
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Nov 10, 2023 1:33 am
by BarryG
infratec wrote: Fri Oct 20, 2023 4:27 pmInside of the WebView2Gadget.pbi is an example. If you load this file and run it
You get this:
Code: Select all
---------------------------
Error
---------------------------
WebView2 DLL not loaded
---------------------------
OK
---------------------------
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Nov 10, 2023 7:40 am
by infratec
Is WebView2 runtime installed?
In Win 10 this should be the cas if your PC is up to date.
But check it in the software control paneL
It is called: Microsoft Edge WebView2 runtime
If not, you have to install it.
Oh, and if you use PB x64 you have to copy the WebView2Loader.dll from the x64 subdirectory.
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Nov 10, 2023 8:17 am
by BarryG
Oh, okay. I thought I could unzip the folder and just run that puppy. Never mind, then.
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Nov 10, 2023 8:32 am
by infratec
If you use PB x86, that's the case.

Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Fri Nov 10, 2023 10:14 am
by BarryG
I see. Nah, I only use 64-bit these days.
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Tue Dec 12, 2023 1:18 am
by vmars316
Tia ,
I downloaded the latest
https://github.com/omegakode/PBWebview2 .
But when I compile Ohm.pb (PBWebview2-master\examples\Ohm Browser) ,
I get the following Error:
Line 258: Structure not found: ffi_cif ,
in PB_Host_Object.pb , line 258 =
.
Pls , what can I do to get past this ?
Thanks for your help...
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Tue Dec 12, 2023 8:19 am
by infratec
You have to include ffi.pbi
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Tue Dec 12, 2023 9:25 pm
by vmars316
Ah Perfect ,
Thank you infratec...
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Thu Dec 14, 2023 9:56 pm
by vmars316
Tia :
I notice a difference in behavior between how
Chrome and MsEdge handles youtube.com vs how
Ohm handles 'clicking' on an 'on page link' .
With Chrome and MsEdge , clicking on a link
results in a change to the 'address bar' ,
showing the updated/requested URL of the 'clicked on link' .
WIth Ohm , it doesn't show the updated URL of the 'clicked on link' .
With my changes to Ohm , I need to check this requested link against a file of 'safe links' to determine if it is a 'safe link' .
I checked Ohm against youtube alternatives , and they all update the 'address bar' .
youtube is doing something to keep user on their site .
Is there a way to catch a 'requested link' for youtube.com .
Actually it might be better to capture
clicking on an 'on page link' (for any page) and
then check if it is a 'safe site' and
don't even start Navigaton if site is unsafe .
I know how to do that in javascript , but how can I do that in PB ?
Thanks for your help...
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Sat Dec 16, 2023 6:38 pm
by infratec
You can look at the NavigationCallback().
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Posted: Sun Dec 17, 2023 10:02 am
by Justin
Doesn't the NavigationStarting event do what you want?
https://learn.microsoft.com/en-us/micro ... navigating