dispatching DOM events from CEF?

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.

dispatching DOM events from CEF?

Postby hengchu » Fri Jul 18, 2014 1:26 pm

I have an application where I have a custom context menu implemented in js and html, and it is tiggered by a dom event. So what I'd like to do is to dispatch that dom event in CefMenuHandler, but I can't find any API related to this. Has anyone tried something like this before?

Thanks!
hengchu
Techie
 
Posts: 12
Joined: Tue Jul 01, 2014 6:27 pm

Re: dispatching DOM events from CEF?

Postby magreenblatt » Fri Jul 18, 2014 1:55 pm

You can use ExecuteJavaScript (see https://code.google.com/p/chromiumembed ... ntegration) or intercept the right-click event in JavaScript and not use CefMenuHandler at all.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: dispatching DOM events from CEF?

Postby hengchu » Fri Jul 18, 2014 3:18 pm

magreenblatt wrote:You can use ExecuteJavaScript (see https://code.google.com/p/chromiumembed ... ntegration) or intercept the right-click event in JavaScript and not use CefMenuHandler at all.


I see. I would also like to get information like can the selection copied, can I paste stuff into the area under the cursor where the right click happened, does CefMenuInfo provide that?
hengchu
Techie
 
Posts: 12
Joined: Tue Jul 01, 2014 6:27 pm

Re: dispatching DOM events from CEF?

Postby magreenblatt » Fri Jul 18, 2014 3:31 pm

hengchu wrote:
magreenblatt wrote:You can use ExecuteJavaScript (see https://code.google.com/p/chromiumembed ... ntegration) or intercept the right-click event in JavaScript and not use CefMenuHandler at all.


I see. I would also like to get information like can the selection copied, can I paste stuff into the area under the cursor where the right click happened, does CefMenuInfo provide that?

The class is called CefContextMenuParams. See the documentation here.
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], Majestic-12 [Bot] and 68 guests