WVBrowser1.IsInPrivateModeEnabled := True;
WVBrowser1.CreateBrowser(WVWindowParent1.Handle);
or
procedure TMainForm.WVBrowser1NavigationStarting(Sender: TObject;
const aWebView: ICoreWebView2;
const aArgs: ICoreWebView2NavigationStartingEventArgs);
begin
if not isReSet then
begin
isReSet := True;
WVBrowser1.ClearBrowsingDataAll;
Sleep(100);
WVBrowser1.Refresh;
end;
end;
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.
Secret mode or Incognito
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Secret mode or Incognito
Setting IsInPrivateModeEnabled to True is the preferred method.
Re: Secret mode or Incognito
WindowlessBrowser
Can you give me an example of how to control clicks?
And the window does not disappear.
Can you give me an example of how to control clicks?
And the window does not disappear.
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Secret mode or Incognito
Modify the TMainForm.HandleMouseMessage function to filter the mouse clicks.
If necessary, avoid the WVBrowser1.SendMouseInput call for some clicks.
If necessary, avoid the WVBrowser1.SendMouseInput call for some clicks.
Re: Secret mode or Incognito
The window doesn't disappear?
It's not headless mode.
It's not headless mode.
- salvadordf
- Posts: 4563
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Secret mode or Incognito
The WindowlessBrowser uses the DirectComposition API :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/20
https://docs.microsoft.com/en-us/windows/win32/directcomp/directcomposition-portal
A true headless browser may use an off-screen rendering mode like the OSR mode in CEF but that feature is still not implemented by Microsoft :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/547
The WindowlessBrowser demo allows you to have more control over mouse events but the application still has to initialize the browser using a TWVDirectCompositionHost instance.
https://github.com/MicrosoftEdge/WebView2Feedback/issues/20
https://docs.microsoft.com/en-us/windows/win32/directcomp/directcomposition-portal
A true headless browser may use an off-screen rendering mode like the OSR mode in CEF but that feature is still not implemented by Microsoft :
https://github.com/MicrosoftEdge/WebView2Feedback/issues/547
The WindowlessBrowser demo allows you to have more control over mouse events but the application still has to initialize the browser using a TWVDirectCompositionHost instance.