Click here to Skip to main content
15,790,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I can successfully raise an event from JS into my delphi application using the technique described in this link:

Delphi Chromium Embedded - communication between Javascript and application code

Now I want to return a value from a function that called in JS.

I test this case: I raise an event in the function that assign a variable in delphi. This method is asynchronous, which means when I call ExecuteJavaScript, the function immediately returns (unblocking) and before the variable is assigned with JS, I reach the variable that is not assigned.

I try to use a sleep(100) function after ExecuteJavaScript and this works well but it is not a very nice solution.

Is there any way to have returns from functions, without using events?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900