Unity communication to JavaScript in browser with return

Is it possible to call a JavaScript Function from UNITY and have that webpage JavaScript return a variable ?

something like…
UNITY (pseudo code)

response1 = Application.ExternalCall( “Passback”, “Hello”);

Where in the HTML page that launched Unity, the function Passback, will do a call
up the chain to an API that will then return a value ?

I have see the example of a call to a function that then uses a call to communicate back to unity, is that the only way?

Yes, that is the only way, since the ExternalCall() is non-blocking.


I try this but for me Application.ExternalCall have a void type return so i can’t stock this one in a variable

Did you have an idea ?