In my application, I overrode OnBeforePopup so that all new popups became windowless:
- Code: Select all
bool SimpleHandler::OnBeforePopup(
CefRefPtr<CefBrowser> browser,
CefRefPtr<CefFrame>,
const CefString &,
const CefString &,
CefLifeSpanHandler::WindowOpenDisposition,
bool,
const CefPopupFeatures &,
CefWindowInfo &winInfo,
CefRefPtr<CefClient> &,
CefBrowserSettings &,
bool *)
{
winInfo.SetAsWindowless(browser->GetHost()->GetWindowHandle(), false);
return false;
}
However, there are some cases where a popup window still shows up. This page(EDIT: no longer available, archive version down in the replies), for example (careful, scam). If you click it soon enough, a new window shows up, apparently as a result of an event listener, listening to mousedown and touchstart on document. Any idea why this happens?