BeforePopup respond only IDE DEBUG mode
Posted: Wed Mar 26, 2025 9:10 am
It's strange that when I browsed , I had blocked the ad link in BeforeResourceLoad before. After opening the website, I clicked on one of the links and BeforePopup didn't respond. So I broke the point in IDE DEBUG mode, and the BeforePopup opened smoothly in the original window. I don't know why?
Code: Select all
https://videovak.com
Code: Select all
var
vUrl: string;
vp: Integer;
begin
// For simplicity, this demo blocks all popup windows and new tabs
Result := (targetDisposition in [CEF_WOD_NEW_FOREGROUND_TAB,
CEF_WOD_NEW_BACKGROUND_TAB, CEF_WOD_NEW_POPUP, CEF_WOD_NEW_WINDOW]);
vUrl := targetUrl;
if Result then
if not(IsConKey(FBlockKeys, vUrl, vp)) and not(SameText(vUrl, 'about:blank'))
then
Chromium1.LoadURL(vUrl);