A core property of the Front-End protocol is that the synchronization of the User Interface occurs when the runtime next asks for some user interaction. If the runtime is doing some processing, there will be no update of the user interface until the next piece of user interaction, that is when the processing finishes. This has some implications for processes that take a number of seconds to process. One such gotcha is the case where the user clicks on a warning “Are you sure you want to do this?” dialog before some processing.
Read more at
https://4js.com/ask-reuben/ig-249/