Page 1 of 1

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

PostPosted: Tue Nov 21, 2023 8:36 am
by fanrongqi
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.

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

PostPosted: Tue Nov 21, 2023 8:50 am
by magreenblatt

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

PostPosted: Tue Nov 28, 2023 3:35 am
by fanrongqi
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.

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

PostPosted: Tue Nov 28, 2023 4:19 am
by ndesktop
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?