disable-javascript-open-windows

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.

disable-javascript-open-windows

Postby gigi777 » Thu Nov 09, 2017 4:06 pm

Hi,

I am working on a headless service that is not expected to show any pop-ups. Prior to 3163 build, I used the javascript_open_windows field of CefBrowserSettings structure and set it to disabled. In 3163, that field was removed. The command-line switch "disable-javascript-open-windows" also does not work. What is the alternate way to prevent javascript from opening windows in 3163 build and beyond?

Thanks.
gigi777
Techie
 
Posts: 13
Joined: Fri Aug 11, 2017 5:35 pm

Re: disable-javascript-open-windows

Postby magreenblatt » Thu Nov 09, 2017 4:32 pm

You can block popups with CefLifeSpanHandler::OnBeforePopup.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: disable-javascript-open-windows

Postby Ramsier » Mon Nov 13, 2017 4:24 am

magreenblatt wrote:You can block popups with CefLifeSpanHandler::OnBeforePopup.


That worked! Simple and useful. Thanks for the info Mag.
Ramsier
Newbie
 
Posts: 1
Joined: Fri Nov 03, 2017 4:13 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 33 guests