Hello,
I'm working on a problem where I want to right-click an element (node), and then select a context menu item that will send some information about that element via JSAPI request to the program that my CEF browser is embedded in (which is written in JavaScript).
Currently I am capturing and sending (via a JSAPI request) node information in OnFocusedNodeChanged, saving that data in my JS code as my "focused node", and then sending a JSAPI request from OnContextMenuCommand that acts as a trigger to do some action on the node information that's saved in the JS code.
This approach leaves a lot of room for things to get messed up, and I'm sending far more JSAPI requests than are necessary (since I don't need to do this right-click action on every element), so I'm wondering if there is a way to acquire a DOM Node from the CefContextMenuParams object, or any other parameter of any of the CefContextMenuHandler methods, so that I can obtain the node information and send it only when I need to from one of the CefContextMenuHandler methods.
While looking through the methods of CefContextMenuParams I noticed that many of the method descriptions contain the phrase "node that the context menu was invoked on". However, it does not appear that there is a method that will actually return the node itself. Is there a way to obtain the "node that the context menu was invoked on", and if not, can a new method be added to CefContextMenuParams that returns the node?
Thanks!