Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registering JS Callbacks using RenderProcessHandler::OnContextCreated() #54

Open
hevc opened this issue Sep 16, 2022 · 1 comment
Open

Comments

@hevc
Copy link

hevc commented Sep 16, 2022

Hi,
I'm trying to register custom callback from JS to C++ using this tutorial: https://bitbucket.org/chromiumembedded/cef/wiki/JavaScriptIntegration#markdown-header-using-js-callbacks. I wrote something like that:
class App : public CefApp, public CefRenderProcessHandler with OnContextCreated(...) and
virtual CefRefPtr<CefRenderProcessHandler> GetRenderProcessHandler() returning this.

Unfortunately the callback OnContextCreated is never called.

Maybe it is related to a wrong thread. The V8 execution must take place on TID_RENDERER thread.

Do you know how to handle callback registration. Is it possible? Maybe another way to achieve it?
It will be nice to have direct communication between C++ and js.

We want something like: https://github.com/Igalia/gst-wpe-webrtc-demo. but without additional server.

@MathieuDuponchelle
Copy link
Collaborator

I'm afraid I have absolutely no idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants