Reputation: 115
I'm making desktop application by CEF3 and I'm building function that take file path and read it into buffer and this work fine to me but I don't know how JavaScript take the value of the file that I read EX : C++ code : string fileContent = readFile(URL); I need to send fileContent to JavaScript variable
Upvotes: 2
Views: 185
Reputation: 20645
Normally you should use javascript bindings to communicate between c++<>js, see the Javascript Integration wiki page. However since this is huge amount of data, for performance reasons it is best to send it via request, see this topic:
If the amount of binary data is large perform a request (via XMLHttpRequest, for example) that is then handled using a custom scheme handler or CefRequestHandler::GetResourceHandler().
Upvotes: 2