CefJSDialogHandler problem

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.

CefJSDialogHandler problem

Postby rado » Tue Aug 14, 2018 7:49 am

I need to hide javascript alert dialogs so I've implemented CefJSDialogHandler in main process, but it does not work.
In CefJSDialogHandler::OnJSDialog I'm setting supress_message to true and returning false.
I've placed break points in debugger on all methods. When dialog is going to open, the GetJSDialogHandler is called where I return my handler, but the CefJSDialogHandler::OnJSDialog is not called, just standard dialog is opened. When I close the dialog, GetJSDialogHandler is called again, finally CefJSDialogHandler::OnDialogClosed is called.
I'm trying it on MacOS, CEF 3.3325. Any idea what could be wrong? Thank you
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am

Re: CefJSDialogHandler problem

Postby rado » Tue Aug 14, 2018 8:49 am

I've got it, it was my mistake. I didn't have the OVERRIDE keyword at my CefJSDialogHandler::OnJSDialog so after upgrading CEF with new handler signature the handler silently stopped working.
rado
Expert
 
Posts: 145
Joined: Wed Oct 05, 2011 3:32 am


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 51 guests