JavaScript call c++ function,or send data to c++。

Built a cool app using CEF that you'd like to share with the community? Talk about it here.

JavaScript call c++ function,or send data to c++。

Postby fanrongqi » Tue Nov 21, 2023 8:36 am

I am a novice and I successfully built it on Win10 using vs2019 https://cef-builds.spotifycdn.com/index.html The downloaded source code, CEF109 version, I really want to write CEF code, but I don't know how to call C++code from JavaScript. I don't know how to transfer the data from an HTML page to C++. I searched a lot of information and couldn't find the code that could run. May I ask which great deity knows how to write code? Please give me a concise example, I really hope to learn. Thank you.
fanrongqi
Newbie
 
Posts: 7
Joined: Tue Nov 21, 2023 8:31 am

Re: JavaScript call c++ function,or send data to c++。

Postby magreenblatt » Tue Nov 21, 2023 8:50 am

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: JavaScript call c++ function,or send data to c++。

Postby fanrongqi » Tue Nov 28, 2023 3:35 am

I am using CEF109 version. Do you have any example projects or code to refer to? I am trying to modify cefsimple, and I have found that different versions of cef are different, making it difficult to find code that can run.
fanrongqi
Newbie
 
Posts: 7
Joined: Tue Nov 21, 2023 8:31 am

Re: JavaScript call c++ function,or send data to c++。

Postby ndesktop » Tue Nov 28, 2023 4:19 am

There are multiple ways of doing C++ <==> JS interoperability (v8 extension with native functions, custom scheme, JS bindings etc.).
What do you want to achieve?
ndesktop
Master
 
Posts: 756
Joined: Thu Dec 03, 2015 10:10 am


Return to Apps Discussion

Who is online

Users browsing this forum: No registered users and 176 guests