Manage url change

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Manage url change

Postby zlxwd » Thu Aug 14, 2014 11:02 am

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?
zlxwd
Newbie
 
Posts: 4
Joined: Thu Jul 31, 2014 3:17 am

Re: Manage url change

Postby magreenblatt » Thu Aug 14, 2014 11:10 am

Use OnBeforeNavigation.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: finder2, Google [Bot] and 26 guests