How to open _blank link in the same window?
Posted: Sat Jun 15, 2024 5:56 am
Hello!
I need links that usually open in a new tab to always open in the same window
In older versions, I used the following code at Chromium_OnBeforePopup
but it doesn't work now 
How to achive what i need?
Thanks!
I need links that usually open in a new tab to always open in the same window
In older versions, I used the following code at Chromium_OnBeforePopup
Code: Select all
case targetDisposition of
CEF_WOD_CURRENT_TAB,
CEF_WOD_SINGLETON_TAB,
CEF_WOD_NEW_FOREGROUND_TAB,
CEF_WOD_NEW_BACKGROUND_TAB,
CEF_WOD_NEW_WINDOW,
CEF_WOD_NEW_POPUP:
begin
ChromiumWindow1.ChromiumBrowser.StopLoad;
req := TCefRequestRef.New;
req.Url := targetUrl;
req.Method := 'GET';
req.Flags := UR_FLAG_ALLOW_STORED_CREDENTIALS;
req.SetReferrer(frame.Url, REFERRER_POLICY_NEVER_CLEAR_REFERRER);
ChromiumWindow1.ChromiumBrowser.LoadRequest(req);
Result := true;
end;
else
Result := False;
end;

How to achive what i need?
Thanks!