salvadordf / CEF4Delphi

CEF4Delphi is an open source project to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC for Windows, Linux and MacOS.
https://www.briskbard.com/forum/
Other
1.19k stars 363 forks source link

Prevent from opening links in chromium browser? #483

Closed edmund5 closed 9 months ago

edmund5 commented 9 months ago

How to prevent from opening links as a pop-up within chromium window? because I open it directly to windows default browser (e.g. FireFox)

using

ShellExecute(0, 'open', PChar(request.Url), nil, nil, SW_SHOWNORMAL);

salvadordf commented 9 months ago

Hi,

Use the TChromiumWindow.ChromiumBrowser.OnBeforePopup event like this and this.