CEF3's ExecuteJavaScript() on Linux

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.

CEF3's ExecuteJavaScript() on Linux

Postby georgechen » Thu Mar 01, 2012 4:50 pm

Hi There,
I was testing CEF3(R475) on Linux Ubuntu 11.10 and found that JavaScript "alert(' ')" function doesn't work, but I think this is not the problem of method CefFrame::ExecuteJavaScript() itself. This could be platform dependent problem because JavaScript "window.open( )" function works fine. How can I solve this problem to make alert message box pup-up ?

To make it more clear , here are part of code from cefclient.cpp
Code: Select all
void RunJavaScriptExecuteTest(CefRefPtr<CefBrowser> browser) {
  browser->GetMainFrame()->ExecuteJavaScript(
      "alert('JavaScript execute works!');", "about:blank", 0);
}
The alert message box does not pup-up.

Code: Select all
void RunPopupTest(CefRefPtr<CefBrowser> browser) {
  browser->GetMainFrame()->ExecuteJavaScript(
      "window.open('http://www.google.com');", "about:blank", 0);
}
The new window pops up properly.

By the way, I did not find CefJSBindingHandler::OnJSBinding() method in CEF3 , if I need to get return from JavaScript program, how can I approach ?

BR
George
georgechen
Mentor
 
Posts: 50
Joined: Mon Feb 13, 2012 4:32 pm

Re: CEF3's ExecuteJavaScript() on Linux

Postby magreenblatt » Thu Mar 01, 2012 5:07 pm

Correct, alert boxes are not yet implemented.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3's ExecuteJavaScript() on Linux

Postby georgechen » Fri Mar 02, 2012 9:01 am

Hi Marshall,
Thanks for replying. Do you have any idea for the timeline when will JavaScript alert() function be implemented ?
and how about the CefJSBindingHandler::OnJSBinding() method will CEF3 support this function as it were in older CEF versions?
BR
George
georgechen
Mentor
 
Posts: 50
Joined: Mon Feb 13, 2012 4:32 pm

Re: CEF3's ExecuteJavaScript() on Linux

Postby John » Tue Apr 24, 2012 12:31 pm

Marshall,
Could you provide some updates on when Javascript 'alert' function might be implemented in CEF3? Appreciate it.
John
Techie
 
Posts: 12
Joined: Tue Apr 24, 2012 12:25 pm

Re: CEF3's ExecuteJavaScript() on Linux

Postby magreenblatt » Tue Apr 24, 2012 1:59 pm

JS dialog support was added in revision 594. http://code.google.com/p/chromiumembedd ... ail?id=507

There is no default implementation on Linux but you can provide your own using CefJSDialogHandler.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 215 guests