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.

Retrun JS result Tchromium

subin
Posts: 20
Joined: Thu Sep 05, 2024 5:15 am

Re: Retrun JS result Tchromium

Post by subin »

Thanks for your reply. Just to know if we call postmessage(Handle, MINIBROWSER_VISITDOM_JS, 0, 0);, then the control will go immediately to VisitDOM3Msg.
User avatar
salvadordf
Posts: 4563
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Retrun JS result Tchromium

Post by salvadordf »

PostMessage is used to send a message asynchronously :
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-postmessagew

That demo calls PostMessage with "Handle" as the first parameter. That Handle belongs to DOMVisitorFrm (the main form) and the VisitDOM3Msg procedure is declared to be executed when the main form receives a MINIBROWSER_VISITDOM_JS message :

Code: Select all

procedure VisitDOM3Msg(var aMessage : TMessage); message MINIBROWSER_VISITDOM_JS;
Post Reply