CEF3: Javascript Extensions

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.

CEF3: Javascript Extensions

Postby awieser » Fri Apr 06, 2012 6:04 pm

Hi,

can somebody tell me how to attach a javascript extension in CEF3 ?
Everytime I try, I get an error telling me I'm on the wrong thread/process, obviously I need to do it within the render process.

Regards
Alexander
awieser
Expert
 
Posts: 140
Joined: Sat Oct 22, 2011 8:35 am

Re: CEF3: Javascript Extensions

Postby Considerate » Wed Apr 11, 2012 8:53 am

I would also like some more information on this.
I'm currently trying to extend ClientApp with JavaScript but I don't get any call to OnWebKitInitialized, OnContextCreated or OnContextReleased the latter one
not really important right now though. Because of this I can't seem to find a way to register an extension in CEF3 that will allow me to add custom events to the window.

Please, if you know anything more or have made this work, do not hesitate to tell me. I appreciate all information I can get.
Considerate
Newbie
 
Posts: 3
Joined: Wed Apr 11, 2012 8:49 am

Re: CEF3: Javascript Extensions

Postby magreenblatt » Wed Apr 11, 2012 9:45 am

I'll add an example to cefclient soon.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3: Javascript Extensions

Postby Considerate » Wed Apr 11, 2012 9:48 am

magreenblatt wrote:I'll add an example to cefclient soon.

Thank you so much.
Considerate
Newbie
 
Posts: 3
Joined: Wed Apr 11, 2012 8:49 am

Re: CEF3: Javascript Extensions

Postby magreenblatt » Thu Apr 12, 2012 5:28 pm

Example added to cefclient in revision 592.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: CEF3: Javascript Extensions

Postby Considerate » Fri Apr 13, 2012 5:16 am

magreenblatt wrote:Example added to cefclient in revision 592.

Once again, thank you very much. It works great and it's easy to see how the code works.
Now off to figuring out how to implement a drop event that can return the absolute path for files, but with this much help it probably wont be so hard.
Considerate
Newbie
 
Posts: 3
Joined: Wed Apr 11, 2012 8:49 am


Return to Support Forum

Who is online

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