Page 1 of 1

communication between frame and form

Posted: Wed Jan 06, 2021 4:13 am
by ericktux
good afternoon and happy new year.
I have a problem, I am currently using the demo "TabbedBrowser2" it works perfect, now what happens is that within the main frame "BrowserFrame" I have added a button which opens a form called "form1" within this form has a button that at the click it I want it to open a url in the current frame, but I have no idea how to use the "BrowserFrame" components from a form.

please help

Re: communication between frame and form

Posted: Wed Jan 06, 2021 8:56 am
by salvadordf
For simple things I would recommend using the "console trick" explained in the DOMVisitor demo but this will probably require to use a JavaScript extension with custom JavaScript code to communicate between the render and browser processes more efficiently.

Read the code comments in the JSExtension demo for all the details about JavaScript extensions :
https://github.com/salvadordf/CEF4Delph ... n.pas#L122

You can use the code in the JSExtension demo and also from the JSRTTIExtension demo to create an extension in a slightly easier way.

The DOMVisitor demo describes some other methods to send information between processes :
https://github.com/salvadordf/CEF4Delph ... r.pas#L216