call Javascript function from C++

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.

call Javascript function from C++

Postby klekle » Fri Apr 06, 2018 1:42 am

Hi,
I am trying to call Javascript function from C++ CEF APIs, I would like to update the contents in the html file through passing arguments to Javascript function. I am getting continuous updated stream of data from the socket which needs to be feed to html file.

I am executing both browser and render in the same address space.

I tried out the examples mentioned in the link

https://bitbucket.org/chromiumembedded/ ... -functions

and also tried out

https://bitbucket.org/chromiumembedded/ ... ?at=master

but no luck.

I believe for both of the examples both render and browser process are in different address space. What needs to be modified if both are in the same address space. Any suggestions are appreciated.

Thanks in advance.
klekle
Newbie
 
Posts: 2
Joined: Fri Apr 06, 2018 1:25 am

Re: call Javascript function from C++

Postby magreenblatt » Fri Apr 06, 2018 12:10 pm

klekle wrote:I am executing both browser and render in the same address space.

Do you mean that you're using single-process mode? That mode is not supported.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: call Javascript function from C++

Postby klekle » Fri Apr 06, 2018 12:50 pm

Yes I am setting settings.single_process = 1, Do we have any alternative solution?
klekle
Newbie
 
Posts: 2
Joined: Fri Apr 06, 2018 1:25 am

Re: call Javascript function from C++

Postby magreenblatt » Fri Apr 06, 2018 12:53 pm

Use the multi-process mode as demonstrated by all of the sample applications and the documentation.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 98 guests