Page 3 of 3

Re: Retrun JS result Tchromium

Posted: Mon Sep 30, 2024 10:14 am
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.

Re: Retrun JS result Tchromium

Posted: Mon Sep 30, 2024 4:07 pm
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;