Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

ExecuteJavaScript Issue

Post Reply
Guilherme Cardozo
Posts: 2
Joined: Thu Apr 30, 2020 1:10 pm

ExecuteJavaScript Issue

Post by Guilherme Cardozo »

Good morning, I am manipulating WhatsApp Web through CEF4, I would like to close my application after sending an attachment.
However, while I'm debugging, it seems that after calling the MainFrame.ExecuteJavaScript method, nothing happens, the attachment is only sent after I give F9, can I really know when the command is executed?
I have little knowledge about CEF4, but when I delved into it, I saw that the attachment is actually sent after delphi runs HandleMessages.
User avatar
salvadordf
Posts: 4575
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: ExecuteJavaScript Issue

Post by salvadordf »

Hi,

If you need to get results from a JavaScript command you can use the information in this thread to send the results to Delphi :
https://www.briskbard.com/forum/viewtop ... 251&p=5316

The trick "ForumReader" gave in that thread seems to be the easiest way.
Guilherme Cardozo
Posts: 2
Joined: Thu Apr 30, 2020 1:10 pm

Re: ExecuteJavaScript Issue

Post by Guilherme Cardozo »

Hi, thanks for reply.

I'm actually trying that through console.log, however the problem is the same.

Maybe the problem is on the JavaScript function.
Post Reply