In my javascript project, there are some functions, which take a while to run. I want to display "something" to the user, that his/hers process has already started.
When I try the usual suspects like showing elements (e.g. div panels), those elements get only rendered, after everything is finished.
The only element, that would show up before the function is executed, is an "alert()".
e.g.
document.getElementById("button").addEventListener("click", function (){
show_message("starting");
this_function_takes_forever();
show_message("done");
});
in the code above, after the user clicked the "button", there would be a pause aka "freezing". After that only the message "done" would pop up.