Page 1 of 1

Sending messages from JS to chromium

Posted: Fri Dec 16, 2022 4:09 pm
by Lion85
Hi Friends, sorry for the ignorance. do you have an example of a communication between javascript and chromium?
I can call javascript functions but I can't retrieve the result.
Surely I am getting the PostMessage wrong.
Thank you all

Re: Sending messages from JS to chromium

Posted: Fri Dec 16, 2022 9:08 pm
by salvadordf
Hi,

There are several demos showing how to send information from JavaScript to Delphi.
Read the code comments in the DOMVisitor and JSExtension demos.

See all the demos inside the CEF4Delphi\demos\Delphi_VCL\JavaScript directory and read this document :
https://bitbucket.org/chromiumembedded/cef/wiki/JavaScriptIntegration.md

Re: Sending messages from JS to chromium

Posted: Mon Dec 19, 2022 3:04 pm
by Lion85
Thanks, I can't solve my problem anyway, I think I will use webView