How to use ExecuteJavascript with a react app

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.

How to use ExecuteJavascript with a react app

Postby RobbyDwayne » Sun Sep 05, 2021 11:29 pm

So I have this:

Code: Select all
CefRefPtr<CefFrame> frame = GetBrowser()->GetMainFrame();
frame->ExecuteJavaScript("OnStartupSequenceFinished();", frame->GetURL(), 0);


That executes whenever the startup sequence has finished so it can go from a loading screen to the actual content. This includes login the user if they remembered their account and also reading the config file for users' preferred languages and so on.

The problem with react is index.html doesn't actually have anything useful and the way things are injected, as far as I understand, is not too reliable.

So how do I go about doing this.
RobbyDwayne
Techie
 
Posts: 15
Joined: Wed Aug 11, 2021 12:52 am

Re: How to use ExecuteJavascript with a react app

Postby magreenblatt » Mon Sep 06, 2021 3:00 am

After React has loaded, call something like https://bitbucket.org/chromiumembedded/ ... t-bindings
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 42 guests