Uncaught TypeError: window.cefQuery is not a function

Having problems with building or using the JCEF Java binding? Ask your questions here.

Uncaught TypeError: window.cefQuery is not a function

Postby minteliu » Mon Aug 01, 2016 3:57 am

my js code:
Code: Select all
window.cefQuery({
             request : "",
             onSuccess : function(response) {
                alert(response);
             },
             onFailure : function(response) {
                alert(response);
             }
          });


my java code:
Code: Select all
public class MessageRouterHandler extends CefMessageRouterHandlerAdapter {

   @Override
   public boolean onQuery(CefBrowser browser, long query_id, String request, boolean persistent,
         CefQueryCallback callback) {
      String msg = "test js";
      callback.success(new StringBuilder(msg).reverse().toString());
      return true;
   }
}


when I run the js code, I get the error:Uncaught TypeError: window.cefQuery is not a function

what can you tell me how to use window.cefQuery?
minteliu
Newbie
 
Posts: 9
Joined: Tue Jul 26, 2016 8:34 pm

Re: Uncaught TypeError: window.cefQuery is not a function

Postby Czarek » Thu Aug 04, 2016 2:21 pm

Read comments in include/cef_message_router.h
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 14 guests