Closed GoogleCodeExporter closed 8 years ago
Hi Thies,
It's already implemented and called CefMessageRouter. Start detailed MainFrame
example application, goto "Bookmarks" and select "Binding Test" and/or "Binding
Test 2" for a more complex example.
See tests.detailed.MainFrame.java (around line 136) for the simple integration:
// Beside the normal handler instances, we're registering a MessageRouter
// as well. That gives us the opportunity to reply to JavaScript method
// calls (JavaScript binding). We're using the default configuration, so
// that the JavaScript binding methods "cefQuery" and "cefQueryCancel"
// are used.
CefMessageRouter msgRouter = CefMessageRouter.create();
msgRouter.addHandler(new MessageRouterHandler(), true);
msgRouter.addHandler(new MessageRouterHandlerEx(client_), false);
client_.addMessageRouter(msgRouter);
The handlers are implemented in tests.detailed.handler.MessageRouterHandler
(for "Binding Test") and MessageRouterHandlerEx (for "Binding Test 2"). The
corresponding HTML is in tests.detailed.handler.binding_test.html and
tests.detailed.handler.binding2_test.html
Regards,
Kai
Original comment by k...@censhare.de
on 10 Nov 2014 at 7:21
Original comment by magreenb...@gmail.com
on 12 Nov 2014 at 8:29
Original issue reported on code.google.com by
th...@literarisch-wertvoll.de
on 7 Nov 2014 at 9:32