Page 1 of 1

Manage url change

PostPosted: Thu Aug 14, 2014 11:02 am
by zlxwd
Before the browser load another url, I want to do some check, and may (1) allow the url change (2) block it, make the browser stay on its original webpage (3) block it, make the browser load the url I specified.

CefRequestHandler::OnBeforeBrowse() provides the required interface. It works for some cases (for example, open a url in new window will call the event handler). But for url change operation caused by js / form submit, it will directly load the new url without emit the event handler.

I want to catch and manage all the url change operation. Is there anyway to do that in CEF?

Re: Manage url change

PostPosted: Thu Aug 14, 2014 11:10 am
by magreenblatt
Use OnBeforeNavigation.