Webview2 control - Chromium browser for Purebasic (Windows) [Jan 1, 2024]
Re: Webview2 control - Chromium browser for Purebasic (Windows)
thanks for providing the new package! However, the Examples folder does not seem to be included(?)infratec wrote: Thu Oct 19, 2023 9:56 pm Fixed a bug when #PB_Any was used for the WebView2Gadget()
PBWebView2 & WebView2Gadget
Hygge
Re: Webview2 control - Chromium browser for Purebasic (Windows)
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.
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)
thanks for the hint!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.
Hygge
Re: Webview2 control - Chromium browser for Purebasic (Windows)
You get this:infratec wrote: Fri Oct 20, 2023 4:27 pmInside of the WebView2Gadget.pbi is an example. If you load this file and run it
Code: Select all
---------------------------
Error
---------------------------
WebView2 DLL not loaded
---------------------------
OK
---------------------------
Re: Webview2 control - Chromium browser for Purebasic (Windows)
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.
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)
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)
If you use PB x86, that's the case. 

Re: Webview2 control - Chromium browser for Purebasic (Windows)
I see. Nah, I only use 64-bit these days.
Re: Webview2 control - Chromium browser for Purebasic (Windows)
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...
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 =
Code: Select all
Protected.ffi_cif cif
Pls , what can I do to get past this ?
Thanks for your help...
vmars.us Win11 x64 , Martin Guitar 000-16 (1995)
"All things in moderation , except for love and forgiveness."
"All things in moderation , except for love and forgiveness."
Re: Webview2 control - Chromium browser for Purebasic (Windows)
You have to include ffi.pbi
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Ah Perfect ,
Thank you infratec...
Thank you infratec...
vmars.us Win11 x64 , Martin Guitar 000-16 (1995)
"All things in moderation , except for love and forgiveness."
"All things in moderation , except for love and forgiveness."
Re: Webview2 control - Chromium browser for Purebasic (Windows)
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...
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...
vmars.us Win11 x64 , Martin Guitar 000-16 (1995)
"All things in moderation , except for love and forgiveness."
"All things in moderation , except for love and forgiveness."
Re: Webview2 control - Chromium browser for Purebasic (Windows)
You can look at the NavigationCallback().
Re: Webview2 control - Chromium browser for Purebasic (Windows)
Doesn't the NavigationStarting event do what you want?
https://learn.microsoft.com/en-us/micro ... navigating
https://learn.microsoft.com/en-us/micro ... navigating