Blank window opening in CEF browser

4.2k views Asked by At

I am trying to open a new window on click of a link using CEF. I have given the href and target as _blank in my HTML.

New page is opening fine when Internet is available, but opens a blank window when connection is down. I tried debugging and as far as I understand , if the OnBeforePopUp function returns false, there should be no problems.

My HTML code line is

<a href="https://www.google.com/" target="_blank" title="Google" aria-label="Google" id="Google"><span class="sr-only">Click here for Google</span> Help</a>

and in my code,

public bool OnBeforePopup(IWebBrowser browser, string url, ref int x, ref int y, ref int width, ref int height)
{
       return false;
}
1

There are 1 answers

0
ranjit powar On

CEF will obviously show blank page when url is down. What you can do is, design one html page to show when site is down and show that static page in CEF.