Page 1 of 1

passing string from javascript to cef to add in vector

PostPosted: Thu Oct 08, 2015 12:17 am
by rahul
hi, i am new to this framework and i need help to pass string from textbox of my html page to C++ vector
Thanks in advance

Re: passing string from javascript to cef to add in vector

PostPosted: Thu Oct 08, 2015 4:22 pm
by amaitland
Have you read the JavaScriptIntegration guide yet?

https://bitbucket.org/chromiumembedded/ ... gration.md

Re: passing string from javascript to cef to add in vector

PostPosted: Fri Oct 09, 2015 12:37 am
by rahul
Thanks for reply
yes, with these only i enabled to transfer my vector values to html page, but i am not getting how to use js callback.
i have created object in java script but could not able to access the object from cef. I have registered my function in context created as:-

CefRefPtr<CefV8Handler> handler = new SimpleApp();
object->SetValue("add",CefV8Value::CreateFunction("add", handler),V8_PROPERTY_ATTRIBUTE_NONE);

but
bool SimpleApp::Execute(const CefString& name,
CefRefPtr<CefV8Value> object,
const CefV8ValueList& arguments,
CefRefPtr<CefV8Value>& retval,
CefString& exception)

function is not getting called .

Re: passing string from javascript to cef to add in vector

PostPosted: Tue Oct 13, 2015 3:58 am
by rahul
hi everyone
I am getting the string return after executing the function in java script but how can we add this value in already presented vector of string in c++ code.

thanks in advance

Re: passing string from javascript to cef to add in vector

PostPosted: Tue Oct 27, 2015 5:55 am
by rahul
THANKS EVERYONE for your support my project is completed...

:D :D :D :D