Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

WebView4Delphi updates

User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Update to WebView2 NuGet 1.0.1108.44

Post by salvadordf »

Hi,

I just updated WebView4Delphi to WebView2 NuGet 1.0.1108.44 :D

This is what's new :
  • Added the GlobalWebView2Loader.OnProcessInfosChanged event.
  • Added the GlobalWebView2Loader.ProcessInfos property.
  • Added the TWVBrowserBase.OnProcessInfosChanged event.
  • Added the TWVBrowserBase.OnFrameNavigationStarting2 event.
  • Added the TWVBrowserBase.OnFrameNavigationCompleted2 event.
  • Added the TWVBrowserBase.OnFrameContentLoading event.
  • Added the TWVBrowserBase.OnFrameDOMContentLoaded event.
  • Added the TWVBrowserBase.OnFrameWebMessageReceived event.
  • Added the TWVBrowserBase.ProcessInfos property.
  • Added the TCoreWebView2NavigationStartingEventArgs.AdditionalAllowedFrameAncestors property.
  • Added the TCoreWebView2ProcessInfo class.
  • Added the TCoreWebView2ProcessInfoCollection class.
  • Updated the WebView2Loader.dll libraries.
TWVBrowserBase.OnFrameNavigationStarting2 is similar to TWVBrowserBase.OnFrameNavigationStarting but the new event is only triggered when you call TCoreWebView2Frame.AddAllBrowserEvents. The same happens with TWVBrowserBase.OnFrameNavigationCompleted2 and TWVBrowserBase.OnFrameNavigationCompleted.

TWVBrowserBase.OnFrameContentLoading, TWVBrowserBase.OnFrameDOMContentLoaded and TWVBrowserBase.OnFrameWebMessageReceived are only triggered when you call TCoreWebView2Frame.AddAllBrowserEvents.

If you use the global environment for the browsers the GlobalWebView2Loader.OnProcessInfosChanged is triggered but if you use a custom environment in a browser then TWVBrowserBase.OnProcessInfosChanged is triggered.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

The last update includes a new demo in Windowless mode called WindowlessBrowser.

It's still unfinished but it's possible to navigate as if you were using the SimpleBrowser demo.

This demo requires a modified version of the MfPack component available here :
https://github.com/salvadordf/MfPack

Read the code comments in uWindowlessBrowser.pas for more information.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

The latest update had these changes :
  • Added WebView4Delphi source path to search path in all demos. Now you don't need to modify the library path in order to use WebView4Delphi.
  • Removed TWVWinControl.TakeSnapshot because it doesn't work in WebView2 browsers.
  • Added the TARGET_64BITS define in webview2.inc in case we need to know if the compiler has a 32 bits or 64 bits target.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

I just created a new release version with the latest changes before submitting WebView4Delphi to be included in Embarcadero's GetIt. :D
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Update to WebView2 NuGet 1.0.1150.38

Post by salvadordf »

Hi,

WebView4Delphi has been updated to WebView2 NuGet 1.0.1150.38 :D

This is what's new in WebView2 :
  • Added TWVBrowserBase.OnBasicAuthenticationRequested event.
This is what's new in WebView4Delphi :
  • Added a TWVBrowserBase.OnBasicAuthenticationRequested example to the MiniBrowser demo.
  • Renamed the "aWebView" parameter to "aFrame" in TWVBrowserBase.OnFrameNavigationStarting, TWVBrowserBase.OnFrameNavigationCompleted, TWVBrowserBase.OnFrameContentLoading, TWVBrowserBase.OnFrameDOMContentLoaded and TWVBrowserBase.OnFrameWebMessageReceived.
  • Added a description name to the installed component group.
  • Added the LogMouseEvent procedure to uWVMiscFunctions.pas in case you need to log all mouse events in the WindowlessBrowser demo.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

This is what's new in WebView4Delphiin since the last update announcement :
  • Added GlobalWebView2Loader.JavaScriptFlags property.
  • Fixed an issue when GlobalWebView2Loader.ForcedDeviceScaleFactor was used with other properties.
  • Fixed TCoreWebView2NewWindowRequestedEventArgs.GetName
  • Updated projects to Delphi 11.1
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Update to WebView2 NuGet 1.0.1185.39

Post by salvadordf »

Hi,

WebView4Delphi has been updated to WebView2 NuGet 1.0.1185.39 :D

This is what's new :
  • Added the TWVBrowserBase.OnContextMenuRequested event.
  • Added the TWVBrowserBase.OnCustomItemSelected event.
  • Added the TWVBrowserBase.OnStatusBarTextChanged event.
  • Added the TWVBrowserBase.OnFramePermissionRequested event.
  • Added the TWVBrowserBase.CallDevToolsProtocolMethodForSession function.
  • Added the TWVBrowserBase.ExclusiveUserDataFolderAccess property.
  • Added the TWVBrowserBase.StatusBarText property.
  • Added the TWVBrowserBase.AllowExternalDrop property.
  • Added the TWVBrowserBase.HiddenPdfToolbarItems property.
  • Renamed the TWVBrowserBase.UIAProvider property to TWVBrowserBase.AutomationProvider.
  • Added the GlobalWebView2Loader.ExclusiveUserDataFolderAccess property.
  • Added the TCoreWebView2ContextMenuItem class.
  • Added the TCoreWebView2ContextMenuItemCollection class.
  • Added the TCoreWebView2ContextMenuTarget class.
  • Fixed the issues with the TCoreWebView2Frame events that weren't triggered.
  • Replaced the Delphi popup menu in the KioskBrowser demo with the new WebView2 functions to handle menu items.
  • Modified the MiniBrowser demo to use the TWVBrowserBase.OnStatusBarTextChanged event and the TWVBrowserBase.StatusBarText property.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Update to WebView2 NuGet 1.0.1210.39

Post by salvadordf »

Hi,

WebView4Delphi has been updated to WebView2 NuGet 1.0.1210.39 :)

This is what's new :
  • Added TWVBrowserBase.ProfileName
  • Added TWVBrowserBase.IsInPrivateModeEnabled
  • Added TWVBrowserBase.CustomItemSelectedEventHandler
  • Added TCoreWebView2ControllerOptions
  • Added TCoreWebView2Profile
  • Added TCoreWebView2Environment.SupportsControllerOptions
  • Added TCoreWebView2ContextMenuItemCollection.AppendValue
  • Added a workaround for a memory leak with custom context menu items
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

The last update included the following changes :
  • Added GlobalWebView2Loader.SupportsCompositionController.
  • Added GlobalWebView2Loader.SupportsControllerOptions.
  • Reset TWVBrowserBase.ProfileName and TWVBrowserBase.IsInPrivateModeEnabled when it's not possible to create the controller with options.
User avatar
salvadordf
Posts: 4079
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: WebView4Delphi updates

Post by salvadordf »

Hi,

The last updates had these changes :
  • Added separate design packages for VCL and FMX thanks to hhonisch.
  • Added Delphi XE2 support thanks to hhonisch.
  • Added GlobalWebView2Loader.LoaderDllPath thanks to hhonisch.
  • Added GlobalWebView2Loader.UseInternalLoader thanks to hhonisch.
  • Added GlobalWebView2Loader.DisableEdgePitchNotification.
If you set GlobalWebView2Loader.UseInternalLoader to true then WebView4Delphi will use an internal loader instead of the WebView2Loader.dll library.

The internal loader was originally created by jchv and it was translated to Pascal by YWtheGod :
  • https://github.com/jchv/OpenWebView2Loader
  • https://github.com/YWtheGod/DRT
The Internal loader is intended to be feature-complete with the original WebView2Loader distributed with the WebView2 NuGet package.
For most intents and purposes, you should prefer using the official WebView2Loader.

If you install WebView4Delphi in Delphi you still have to open WebView4Delphi_group.groupproj but now you have two options :
  • If you want to install the FMX and VCL components then select the "Build All" context menu option and then select "Install" in WebView4DelphiVCL_designtime.bpl and WebView4DelphiFMX_designtime.bpl
  • If you just want to install the VCL components then build WebView4DelphiVCLRTL.bpl and install WebView4DelphiVCL_designtime.bpl.
The new GlobalWebView2Loader.LoaderDllPath property allows you to load WebView2Loader.dll from a custom directory.

The GlobalWebView2Loader.DisableEdgePitchNotification property is set to true by default. It's a workaround given by Microsoft to disable the "Download Edge" notifications.
Locked