ExecuteJavascript - when is it executed

I’m fiddling around with WebControlWrapper and I would like to know when exactly an ExecuteJavascript string is sent to the browser.

My impression is that all ExecuteJavascript within Xojo method are sent to the browser only after the Xojo method has ended. Is this true?

Yes. More accurately, it is after the entire event loop is complete. For instance, when a user clicks on a button, a message is sent to th app and the Action event fires. Every bit of code that is called as a result of that action, whether it is your code or internal framework code queues up code to be returned to the browser. Once the event comes to completion the queued code is assembled and returned to the browser in one big chunk.

Thanks a lot - good to know.

Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.