Change popup target so it opens in the main frame?
Posted: Wed Aug 03, 2022 4:43 pm
I'm using CEF4Delphi to load a web app into a Delphi program. The web app only runs on a new tab (by design) after the user clicks a button that triggers some javascript code and eventually calls . CEF4Delphi opens a new window, so I use OnBeforePopup to stop the new window from opening while capturing the popup URL. I then open the URL from the main frame... it should work, but it fails (it redirects to the login screen when the URL is loaded in the main frame). Apparently the button that starts the web app also sets headers, cookies and other security-related properties, which are all lost when the new (simple) GET request occurs in the main frame.
Is there a way to just change the popup target so it opens in the main frame and not in a new window (keeping all request headers and stuff)?
Code: Select all
window.open('the_url','_newtab')
Is there a way to just change the popup target so it opens in the main frame and not in a new window (keeping all request headers and stuff)?